From: <tr...@us...> - 2003-02-10 08:41:27
|
Update of /cvsroot/basedb/basedb/src/sectionCounter In directory sc8-pr-cvs1:/tmp/cvs-serv29789/src/sectionCounter Modified Files: sectionCounter.cc Log Message: Work done on laptop in Gothenburg - no time for more detailed message Index: sectionCounter.cc =================================================================== RCS file: /cvsroot/basedb/basedb/src/sectionCounter/sectionCounter.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sectionCounter.cc 6 Feb 2003 00:43:36 -0000 1.1 --- sectionCounter.cc 10 Feb 2003 08:40:48 -0000 1.2 *************** *** 2,6 **** // // BioArray Software Environment (BASE) - homepage http://base.thep.lu.se/ ! // Copyright (C) 2002 Lao Saal, Carl Troein, Johan Vallon-Christersson // // This file is part of BASE. --- 2,6 ---- // // BioArray Software Environment (BASE) - homepage http://base.thep.lu.se/ ! // Copyright (C) 2002,2003 Lao Saal, Carl Troein, Johan Vallon-Christersson // // This file is part of BASE. *************** *** 25,28 **** --- 25,29 ---- #include <string> #include <map> + #include <set> #include "basefile.h" *************** *** 85,88 **** --- 86,90 ---- map<string,vector<string> > assayInfo; vector<string> assays; + set<string> extraFloats; if(!bfr.readSection(sect, true)) *************** *** 104,107 **** --- 106,118 ---- if(i != sect.headers.end()) registerAssays(assays, (*i).second); + map<string,int> sef; + if(sect.findFieldList("setExtraFloats", sef)) + { + for(map<string,int>::iterator i = sef.begin(); + i != sef.end(); i++) + { + extraFloats.insert((*i).first); + } + } } sect.subSections = 0; *************** *** 109,116 **** break; } // Output the sections and their counts for(map<string,int>::iterator i = sections.begin(); i != sections.end(); i++) cout << (*i).first << "\t" << (*i).second << "\n"; ! cout << endl; // Output the encountered assays, one per line, followed by parents // and optionally by name. --- 120,128 ---- break; } + cout << "sectionCount v1\n"; // Output the sections and their counts for(map<string,int>::iterator i = sections.begin(); i != sections.end(); i++) cout << (*i).first << "\t" << (*i).second << "\n"; ! cout << "\n"; // Output the encountered assays, one per line, followed by parents // and optionally by name. *************** *** 127,130 **** --- 139,155 ---- cout << (*i) << "\n"; } + } + cout << "\n"; + if(!extraFloats.empty()) + { + // Output the extra float column names, if any. + for(set<string>::iterator i = extraFloats.begin(); + i != extraFloats.end(); i++) + { + if(i != extraFloats.begin()) + cout << "\t"; + cout << (*i); + } + cout << "\n"; } |