Changeset 9597 for trunk/MagicSoft/Mars/mjobs
- Timestamp:
- 06/25/10 15:58:02 (15 years ago)
- Location:
- trunk/MagicSoft/Mars/mjobs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mjobs/MJSimulation.cc
r9572 r9597 128 128 MJSimulation::MJSimulation(const char *name, const char *title) 129 129 : fForceMode(kFALSE), fCamera(kTRUE), fForceTrigger(kFALSE), 130 fOperationMode(kModeData) 130 fOperationMode(kModeData), fRunNumber(-1) 131 131 { 132 132 fName = name ? name : "MJSimulation"; … … 315 315 case kModeData: 316 316 header.SetRunType(MRawRunHeader::kRTMonteCarlo|MRawRunHeader::kRTData); 317 header.SetRunInfo(0, fRunNumber<0 ? 3 : fRunNumber); 317 318 break; 318 319 … … 320 321 header.SetRunType(MRawRunHeader::kRTMonteCarlo|MRawRunHeader::kRTPedestal); 321 322 header.SetSourceInfo("Pedestal"); 323 header.SetRunInfo(0, fRunNumber<0 ? 1 : fRunNumber); 322 324 break; 323 325 … … 325 327 header.SetRunType(MRawRunHeader::kRTMonteCarlo|MRawRunHeader::kRTCalibration); 326 328 header.SetSourceInfo("Calibration"); 329 header.SetRunInfo(0, fRunNumber<0 ? 2 : fRunNumber); 327 330 break; 328 331 329 332 case kModePointRun: 330 333 header.SetRunType(MRawRunHeader::kRTMonteCarlo|MRawRunHeader::kRTPointRun); 334 header.SetRunInfo(0, fRunNumber<0 ? 0 : fRunNumber); 331 335 break; 332 336 } … … 512 516 // ------------------------------------------------------------------- 513 517 514 const char *fmt = Form("s/cer([0-9]+)/%%s\\/00$1_%c_MonteCarlo.root/", header.GetRunTypeChar()); 515 516 // FIXME: Pedestal and Calibration runs should get P and C 517 const TString rule1(Form("s/cer([0-9]+)/%s\\/00$1_R_MonteCarlo.root/", Esc(fPathOut).Data())); 518 const TString rule2(Form("s/cer([0-9]+)/%s\\/00$1_Y_MonteCarlo.root/", Esc(fPathOut).Data())); 519 const TString rule4(Form("s/cer([0-9]+)/%s\\/00$1_I_MonteCarlo.root/", Esc(fPathOut).Data())); 520 const TString rule3(Form(fmt, Esc(fPathOut).Data())); 518 const char *fmt = Form("s/cer([0-9]+)([0-9][0-9][0-9])/%s\\/%08d.$2_%%c_MonteCarlo$1.root/", Esc(fPathOut).Data(), fRunNumber); 519 520 const TString rule1(Form(fmt, 'R')); 521 const TString rule2(Form(fmt, 'Y')); 522 const TString rule4(Form(fmt, 'I')); 523 const TString rule3(Form(fmt, header.GetRunTypeChar())); 521 524 522 525 MWriteRootFile write4a( 2, rule4, fOverwrite?"RECREATE":"NEW", "Star file"); … … 551 554 552 555 // D: Dedicated file structure 553 write3a.AddContainer("ElectronicNoise", "RunHeaders"); 554 write3a.AddContainer("MRawEvtData", "Events"); 556 write3a.AddContainer("ElectronicNoise", "RunHeaders"); 557 write3a.AddContainer("IntendedPulsePos", "RunHeaders"); 558 write3a.AddContainer("MRawEvtData", "Events"); 559 // It doesn't make much sene to write this information 560 // to the file because the units are internal units not 561 // related to the output samples 562 // if (header.IsDataRun() || fForceTrigger) 563 // write3a.AddContainer("TriggerPos", "Events"); 555 564 556 565 // I: Dedicated file structure -
trunk/MagicSoft/Mars/mjobs/MJSimulation.h
r9441 r9597 23 23 Bool_t fForceTrigger; // Force the use of the trigger "electronics" 24 24 25 Int_t fOperationMode; // Operation mode (data, ped, cal, pointrun) 25 Int_t fOperationMode; // Operation mode (data, ped, cal, pointrun) 26 Int_t fRunNumber; // 8 digits run number to be used for the file names 26 27 27 28 Bool_t WriteResult(const MParList &plist, const MSequence &seq); … … 38 39 void SetMode(Int_t mode) { fOperationMode = mode; } 39 40 41 void SetRunNumber(Int_t n=-1) { fRunNumber = n%100000000; } 42 40 43 // Process 41 44 Bool_t Process(const MArgs &args, const MSequence &seq);
Note:
See TracChangeset
for help on using the changeset viewer.