Changeset 2709
- Timestamp:
- 12/18/03 11:51:15 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2708 r2709 21 21 * mreport/Makefile, mreport/ReportLinkDef.h: 22 22 - added MReportRun 23 24 * merpp.cc: 25 - added a first implementation to be able searching report 26 files for the run number 23 27 24 28 -
trunk/MagicSoft/Mars/merpp.cc
r2687 r2709 21 21 #include "MRawEvtHeader.h" 22 22 #include "MRawCrateArray.h" 23 24 #include "MFilterList.h" 25 #include "MFDataMember.h" 23 26 24 27 using namespace std; … … 70 73 gLog << " --start=yyyy-mm-dd/hh:mm:ss.mmm: Start event time for merpping report files" << endl; 71 74 gLog << " --stop=yyyy-mm-dd/hh:mm:ss.mmm: Stop event time for merpping report files" << endl; 75 gLog << " --run=#: Only merpp data corresponding to this run number" << endl; 72 76 gLog << " -?/-h: This help" << endl << endl; 73 77 gLog << " REMARK: At the moment you can process a .raw _or_ a .rep file, only!" << endl << endl; … … 115 119 kTimeStop.SetName("MTimeStop"); 116 120 121 const Int_t kRunNumber = arg.HasOption("--run=") ? arg.GetIntAndRemove("--run=") : -1; 122 117 123 if (!kTimeStart) 118 124 cout << "No start time!" << endl; … … 219 225 // be created by MRawFileRead::PreProcess 220 226 // 221 MTask *read = 0; 222 MTask *write = 0; 227 MTask *read = 0; 228 MFilterList *filter = 0; 229 MTask *write = 0; 223 230 224 231 const TString option(kUpdate ? "UPDATE" : "RECREATE"); 225 232 if (isreport || isdc) 226 233 { 227 MReportFileRead *r = new MReportFileRead(kNamein);228 r->SetTimeStart(kTimeStart);229 r->SetTimeStop(kTimeStop);230 if (isdc)231 {232 r->SetHasNoHeader();233 r->AddToList("MReportCurrents");234 }235 else236 {237 r->AddToList("MReportCC");238 r->AddToList("MReportDAQ");239 r->AddToList("MReportDrive");240 r->AddToList("MReportCamera");241 r->AddToList("MReportTrigger");242 }243 read = r;244 245 234 MWriteRootFile *w = new MWriteRootFile(kNameout, option, "Magic root-file", kComprlvl); 246 235 if (isdc) … … 270 259 } 271 260 write = w; 261 262 MReportFileRead *r = new MReportFileRead(kNamein); 263 r->SetTimeStart(kTimeStart); 264 r->SetTimeStop(kTimeStop); 265 if (isdc) 266 { 267 r->SetHasNoHeader(); 268 r->AddToList("MReportCurrents"); 269 } 270 else 271 { 272 r->AddToList("MReportCC"); 273 r->AddToList("MReportDAQ"); 274 r->AddToList("MReportDrive"); 275 r->AddToList("MReportCamera"); 276 r->AddToList("MReportTrigger"); 277 if (kRunNumber>0) 278 { 279 r->AddToList("MReportRun"); 280 // FIXME: Too difficult! 281 filter = new MFilterList; 282 filter->SetOwner(); 283 filter->AddToList(new MFDataMember("MReportRun.fRunNumber", '>', kRunNumber-0.5)); 284 filter->AddToList(new MFDataMember("MReportRun.fRunNumber", '<', kRunNumber+0.5)); 285 w->SetFilter(filter); 286 } 287 } 288 read = r; 272 289 } 273 290 else … … 278 295 279 296 tasks.AddToList(read); 297 if (filter) 298 tasks.AddToList(filter); 280 299 tasks.AddToList(write); 281 300
Note:
See TracChangeset
for help on using the changeset viewer.