Changeset 9597 for trunk/MagicSoft/Mars/mjobs/MJSimulation.cc
- Timestamp:
- 06/25/10 15:58:02 (14 years ago)
- File:
-
- 1 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
Note:
See TracChangeset
for help on using the changeset viewer.