Changeset 541 for BAORadio/AmasNancay/mergeRawOnOff.cc
- Timestamp:
- Oct 3, 2011, 2:17:41 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BAORadio/AmasNancay/mergeRawOnOff.cc
r540 r541 65 65 string outPath_; 66 66 string sourceName_; 67 string filePattern_;67 string ppfFile_; 68 68 } para; 69 69 //----- … … 134 134 regexp(aStr.c_str(),pattern_.c_str(),&b,&e); 135 135 136 cout << "investigate " << aStr << " to find " << pattern_137 << "[" <<b<<","<<e<<"]"138 << endl;136 // cout << "investigate " << aStr << " to find " << pattern_ 137 // << "[" <<b<<","<<e<<"]" 138 // << endl; 139 139 140 140 … … 147 147 string pattern_; 148 148 }; 149 //------------------------------------------------------- 149 150 //------------------------------------------------------- 150 151 void meanOnCycles() throw(string) { … … 153 154 directoryName = para.inPath_ + "/" + para.sourceName_; 154 155 155 listOfFiles = ListOfFileInDir(directoryName,para. filePattern_);156 157 list<string>::const_iterator iFile, iFileEnd ;156 listOfFiles = ListOfFileInDir(directoryName,para.ppfFile_); 157 158 list<string>::const_iterator iFile, iFileEnd, iSpec, iSpecEnd; 158 159 iFileEnd = listOfFiles.end(); 159 160 … … 163 164 PInPersist fin(*iFile); 164 165 vector<string> vec = fin.GetNameTags(); 165 vector<string> listOfSpectra; 166 166 list<string> listOfSpectra; 167 167 std::remove_copy_if( 168 168 vec.begin(), vec.end(), back_inserter(listOfSpectra), … … 170 170 ); 171 171 172 for (size_t i=0; i<listOfSpectra.size(); ++i){ 173 cout << " spactra <" << listOfSpectra[i] << ">" << endl; 174 } 172 iSpecEnd = listOfSpectra.end(); 173 listOfSpectra.sort(stringCompare); 174 175 for (iSpec = listOfSpectra.begin(); iSpec !=iSpecEnd; ++iSpec){ 176 cout << " spactra <" << *iSpec << ">" << endl; 177 } 178 175 179 } 176 180 … … 189 193 string outputPath = "."; 190 194 string sourceName = "Abell85"; 191 string filePattern;195 string ppfFile; 192 196 193 197 … … 211 215 ka+=2; 212 216 } 213 else if (strcmp(arg[ka],"-s ource")==0) {217 else if (strcmp(arg[ka],"-src")==0) { 214 218 sourceName=arg[ka+1]; 215 219 ka+=2; 216 220 } 217 else if (strcmp(arg[ka],"- filePattern")==0) {218 filePattern=arg[ka+1];221 else if (strcmp(arg[ka],"-ppfFile")==0) { 222 ppfFile=arg[ka+1]; 219 223 ka+=2; 220 224 } … … 226 230 para.outPath_ = outputPath; 227 231 para.sourceName_ = sourceName; 228 para. filePattern_ = filePattern;232 para.ppfFile_ = ppfFile; 229 233 230 234 cout << "Dump Initial parameters ............" << endl; … … 233 237 << " outputPath = " << outputPath << "\n" 234 238 << " sourceName = " << sourceName << "\n" 235 << " filePattern = " << filePattern<< "\n"239 << " ppfFile = " << ppfFile << "\n" 236 240 << " debuglev = " << debuglev << "\n"; 237 241 cout << "...................................." << endl; 242 243 if ( "" == ppfFile ) { 244 cerr << "mergeRawOnOff.cc: you have forgotten ppfFile option" 245 << endl; 246 return 999; 247 } 248 238 249 239 250 try {
Note: See TracChangeset
for help on using the changeset viewer.