Changeset 6958 for trunk/MagicSoft/Mars/mjobs
- Timestamp:
- 04/19/05 18:09:58 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mjobs
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mjobs/JobsLinkDef.h
r6897 r6958 18 18 #pragma link C++ class MJCut+; 19 19 #pragma link C++ class MJOptimize+; 20 #pragma link C++ class MJSpectrum+; 20 21 21 22 #endif -
trunk/MagicSoft/Mars/mjobs/MDataSet.cc
r6922 r6958 71 71 72 72 #include <TEnv.h> 73 #include <TChain.h> 73 74 #include <TRegexp.h> 74 75 #include <TSystem.h> // TSystem::ExpandPath … … 234 235 } 235 236 236 Bool_t MDataSet::AddSequencesToList(const TList &list, MRead &read) 237 { 238 MDirIter files; 239 237 Bool_t MDataSet::AddSequencesFromList(const TList &list, MDirIter &files) 238 { 240 239 TIter Next(const_cast<TList*>(&list)); 241 240 TObject *o=0; … … 258 257 files.Print(); 259 258 } 260 259 return kTRUE; 260 } 261 262 Bool_t MDataSet::AddFilesOn(MRead &read) const 263 { 264 MDirIter files; 265 if (!AddSequencesFromList(fSequencesOn, files)) 266 return kFALSE; 267 return read.AddFiles(files)>0; 268 } 269 270 Bool_t MDataSet::AddFilesOff(MRead &read) const 271 { 272 MDirIter files; 273 if (!AddSequencesFromList(fSequencesOff, files)) 274 return kFALSE; 261 275 return read.AddFiles(files)>0; 262 276 } … … 269 283 } 270 284 271 Bool_t MDataSet::AddFilesOn(MRead &read) const 272 { 273 return AddSequencesToList(fSequencesOn, read); 274 } 275 276 Bool_t MDataSet::AddFilesOff(MRead &read) const 277 { 278 return AddSequencesToList(fSequencesOff, read); 285 Int_t MDataSet::AddFilesToChain(MDirIter &files, TChain &chain) 286 { 287 Int_t num=0; 288 while (1) 289 { 290 const TString fname = files.Next(); 291 if (fname.IsNull()) 292 break; 293 294 const Int_t n = chain.Add(fname); 295 if (n<=0) 296 return kFALSE; 297 num += n; 298 } 299 return num; 300 } 301 302 Bool_t MDataSet::AddFilesOn(TChain &chain) const 303 { 304 MDirIter files; 305 if (!AddSequencesFromList(fSequencesOn, files)) 306 return kFALSE; 307 return AddFilesToChain(files, chain)>0; 308 } 309 310 Bool_t MDataSet::AddFilesOff(TChain &chain) const 311 { 312 MDirIter files; 313 if (!AddSequencesFromList(fSequencesOff, files)) 314 return kFALSE; 315 return AddFilesToChain(files, chain)>0; 316 } 317 318 Bool_t MDataSet::AddFiles(TChain &read) const 319 { 320 const Bool_t rc1 = AddFilesOff(read); 321 const Bool_t rc2 = AddFilesOn(read); 322 return rc1 && rc2; 279 323 } 280 324 -
trunk/MagicSoft/Mars/mjobs/MDataSet.h
r6906 r6958 10 10 #endif 11 11 12 class TChain; 13 12 14 class MRead; 15 class MDirIter; 13 16 class MPointingPos; 14 17 … … 54 57 55 58 // Setter 56 static Bool_t AddSequencesToList(const TList &list, MRead &read); 59 static Bool_t AddSequencesFromList(const TList &list, MDirIter &files); 60 static Int_t AddFilesToChain(MDirIter &files, TChain &chain); 57 61 58 62 Bool_t AddFiles(MRead &read) const; 59 63 Bool_t AddFilesOn(MRead &read) const; 60 64 Bool_t AddFilesOff(MRead &read) const; 65 66 Bool_t AddFiles(TChain &read) const; 67 Bool_t AddFilesOn(TChain &read) const; 68 Bool_t AddFilesOff(TChain &read) const; 61 69 62 70 // TObject -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
r6953 r6958 373 373 interlacedcont.Add(&hpndiod); 374 374 if (fIsRelTimesUpdate) 375 375 interlacedcont.Add(&hrelcam); 376 376 } 377 377 … … 601 601 // Intensity Calibration histogramming 602 602 // 603 MFillH filpin( "MHCalibrationChargePINDiode", "MExtractedSignalPINDiode", "FillPINDiode");604 MFillH filbnd( "MHCalibrationChargeBlindCam", "MExtractedSignalBlindPixel", "FillBlindCam");605 MFillH filcam( "MHCalibrationChargeCam","MExtractedSignalCam", "FillChargeCam");606 MFillH filtme( "MHCalibrationRelTimeCam","MArrivalTimeCam", "FillRelTime");603 MFillH filpin(&hpndiod, "MExtractedSignalPINDiode", "FillPINDiode"); 604 MFillH filbnd(&hbndcam, "MExtractedSignalBlindPixel", "FillBlindCam"); 605 MFillH filcam(&hchacam, "MExtractedSignalCam", "FillChargeCam"); 606 MFillH filtme(&hrelcam, "MArrivalTimeCam", "FillRelTime"); 607 607 MFillH filhil("MHCalibrationHiLoCam", "MExtractedSignalCam", "FillHiLoRatio"); 608 608 MFillH filpul("MHCalibrationPulseTimeCam", "MRawEvtData", "FillPulseTime"); 609 610 609 filpin.SetBit(MFillH::kDoNotDisplay); 611 610 filbnd.SetBit(MFillH::kDoNotDisplay); -
trunk/MagicSoft/Mars/mjobs/MJCut.cc
r6955 r6958 495 495 if (fIsWobble) 496 496 tlist2.AddToList(&hcalc2); 497 tlist2.AddToList(&taskenv1); 497 498 tlist2.AddToList(&taskenv2); 498 499 tlist2.AddToList(&cont0); … … 502 503 tlist2.AddToList(&fill1a); 503 504 tlist2.AddToList(&cont1); 504 tlist2.AddToList(&taskenv1);505 505 if (!fWriteOnly && !fIsWobble) 506 506 tlist2.AddToList(&ffs); -
trunk/MagicSoft/Mars/mjobs/Makefile
r6898 r6958 35 35 MJStar.cc \ 36 36 MJCut.cc \ 37 MJOptimize.cc 37 MJOptimize.cc \ 38 MJSpectrum.cc 38 39 39 40 ############################################################
Note:
See TracChangeset
for help on using the changeset viewer.