Changeset 5161 for trunk/MagicSoft
- Timestamp:
- 10/01/04 19:12:42 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mjobs
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
r5157 r5161 69 69 #include "MReadReports.h" 70 70 #include "MReadMarsFile.h" 71 #include "MRawFileRead.h" 71 72 #include "MGeomApply.h" 72 73 #include "MMcPedestalCopy.h" … … 171 172 } 172 173 173 Bool_t MJCalibrateSignal::ProcessFile(MPedestalCam &pedcam , Bool_t ismc)174 Bool_t MJCalibrateSignal::ProcessFile(MPedestalCam &pedcam) 174 175 { 175 176 if (!fSequence.IsValid()) … … 274 275 plist.AddToList(&tlist); 275 276 277 // FIXME: Move this to an intermediate class MJMagic 278 TString name = iter.Next(); 279 Byte_t filetype = MRawFileRead::IsFileValid(name); 280 if (!filetype) 281 filetype = MReadMarsFile::IsFileValid(name)+1; 282 if (filetype==1||filetype>3) 283 { 284 gLog << err << "ERROR - FileType of first file " << name << " unknown..." << endl; 285 return kFALSE; 286 } 287 // 1 = raw-file 288 // 2 = raw-root file 289 // 3 = mc-raw file 290 276 291 MReadReports readreal; 277 292 readreal.AddTree("Events", "MTime.", kTRUE); … … 286 301 readmc.DisableAutoScheme(); 287 302 readmc.AddFiles(iter); 303 304 MRawFileRead readraw(NULL); 305 readraw.AddFiles(iter); 288 306 289 307 MGeomApply apply; // Only necessary to create geometry … … 298 316 taskenv2.SetDefault(extractor2); 299 317 MCalibrateData calib; 300 if ( ismc)318 if (filetype==3) 301 319 calib.SetCalibrationMode(MCalibrateData::kFfactor); 302 320 MCalibrateRelTimes caltm; … … 370 388 tlist2.AddToList(&apply); 371 389 tlist2.AddToList(&merge); 372 tlist2.AddToList( ismc? (MTask*)&pcopy : (MTask*)&pedlo);390 tlist2.AddToList(filetype==3 ? (MTask*)&pcopy : (MTask*)&pedlo); 373 391 tlist2.AddToList(&fill0); 374 392 if (extractor1) … … 391 409 392 410 // Now setup main tasklist 393 tlist.AddToList(ismc ? (MTask*)&readmc : (MTask*)&readreal); 411 switch (filetype) 412 { 413 case 1: tlist.AddToList(&readraw); break; 414 case 2: tlist.AddToList(&readreal); break; 415 case 3: tlist.AddToList(&readmc); break; 416 } 417 394 418 tlist.AddToList(&tlist2, "Events"); 395 419 tlist.AddToList(&pcalc, "Drive"); -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.h
r5030 r5161 26 26 MJCalibrateSignal(const char *name=NULL, const char *title=NULL); 27 27 28 Bool_t ProcessFile(MPedestalCam &cam , Bool_t ismc=kFALSE);28 Bool_t ProcessFile(MPedestalCam &cam); 29 29 30 30 ClassDef(MJCalibrateSignal, 0) // Tool to create a pedestal file (MPedestalCam) -
trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
r5135 r5161 1496 1496 if (fSequence.IsValid()) 1497 1497 { 1498 const Int_t n0 = fSequence.SetupCalRuns(iter, fPathData );1498 const Int_t n0 = fSequence.SetupCalRuns(iter, fPathData, IsDataCheck()); 1499 1499 const Int_t n1 = fSequence.GetNumCalRuns(); 1500 1500 if (n0==0) -
trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
r5153 r5161 575 575 if (fSequence.IsValid()) 576 576 { 577 const Int_t n0 = fUseData ? fSequence.SetupDatRuns(iter, fPathData ) : fSequence.SetupPedRuns(iter, fPathData);577 const Int_t n0 = fUseData ? fSequence.SetupDatRuns(iter, fPathData, fDataCheck) : fSequence.SetupPedRuns(iter, fPathData, fDataCheck); 578 578 const Int_t n1 = fUseData ? fSequence.GetNumDatRuns() : fSequence.GetNumPedRuns(); 579 579 if (n0==0)
Note:
See TracChangeset
for help on using the changeset viewer.