Ignore:
Timestamp:
06/25/10 15:58:02 (14 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mjobs/MJSimulation.cc

    r9572 r9597  
    128128MJSimulation::MJSimulation(const char *name, const char *title)
    129129    : fForceMode(kFALSE), fCamera(kTRUE), fForceTrigger(kFALSE),
    130     fOperationMode(kModeData)
     130    fOperationMode(kModeData), fRunNumber(-1)
    131131{
    132132    fName  = name  ? name  : "MJSimulation";
     
    315315    case kModeData:
    316316        header.SetRunType(MRawRunHeader::kRTMonteCarlo|MRawRunHeader::kRTData);
     317         header.SetRunInfo(0, fRunNumber<0 ? 3 : fRunNumber);
    317318        break;
    318319
     
    320321        header.SetRunType(MRawRunHeader::kRTMonteCarlo|MRawRunHeader::kRTPedestal);
    321322        header.SetSourceInfo("Pedestal");
     323        header.SetRunInfo(0, fRunNumber<0 ? 1 : fRunNumber);
    322324        break;
    323325
     
    325327        header.SetRunType(MRawRunHeader::kRTMonteCarlo|MRawRunHeader::kRTCalibration);
    326328        header.SetSourceInfo("Calibration");
     329        header.SetRunInfo(0, fRunNumber<0 ? 2 : fRunNumber);
    327330        break;
    328331
    329332    case kModePointRun:
    330333        header.SetRunType(MRawRunHeader::kRTMonteCarlo|MRawRunHeader::kRTPointRun);
     334        header.SetRunInfo(0, fRunNumber<0 ? 0 : fRunNumber);
    331335        break;
    332336    }
     
    512516    // -------------------------------------------------------------------
    513517
    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()));
    521524
    522525    MWriteRootFile write4a( 2, rule4, fOverwrite?"RECREATE":"NEW", "Star file");
     
    551554
    552555    // 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");
    555564
    556565    // I: Dedicated file structure
Note: See TracChangeset for help on using the changeset viewer.