Ignore:
Timestamp:
04/23/07 20:11:25 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/callisto.cc

    r8406 r8434  
    5555    gLog << "   -y                        Extract and calibrate signal" << endl << endl;
    5656    gLog << " Data Type (exclusive):" << endl;
    57     gLog << "   -raw                      Read input from raw-data <default>" << endl;
    5857    gLog << "   -mc                       Input root-files are monte carlo files" << endl;
    59     gLog << "   -root                     Read input from root-files (merpped)" << endl << endl;
    6058    gLog << " Options:" << endl;
    6159    gLog.Usage();
     
    192190          Bool_t  kModeC      = arg.HasOnlyAndRemove("-c");
    193191          Bool_t  kModeY      = arg.HasOnlyAndRemove("-y");
    194 
    195     MJCalib::DataType_t kDataType = MJCalib::kIsUseRawData; // root
    196     if (arg.HasOnlyAndRemove("-root"))
    197         kDataType = MJCalib::kIsUseRootData; // root
    198     if (arg.HasOnlyAndRemove("-raw"))
    199         kDataType = MJCalib::kIsUseRawData;  // raw
    200     if (arg.HasOnlyAndRemove("-mc"))
    201         kDataType = MJCalib::kIsUseMC;       // monte carlo
     192    const Bool_t  kIsMC       = arg.HasOnlyAndRemove("-mc");
    202193
    203194    if (!kInpathY.IsNull() || !kOutpathY.IsNull() || !kOutpath.IsNull() || !kPath.IsNull())
     
    267258    TString kSequence = arg.GetArgumentStr(0);
    268259
    269     if (kSequence.IsDigit())
    270     {
    271         const Int_t numseq = kSequence.Atoi();
    272         kSequence = Form("/magic/sequences/%04d/sequence%08d.txt", numseq/10000, numseq);
    273         gLog << inf << "Inflated sequence file: " << kSequence << endl;
    274     }
    275 
    276     if (gSystem->AccessPathName(kSequence, kFileExists))
    277     {
    278         gLog << err << "Sorry, sequence file '" << kSequence << "' doesn't exist." << endl;
     260    if (!MSequence::InflatePath(kSequence, kIsMC))
    279261        return 3;
    280     }
    281262
    282263    if (gSystem->AccessPathName(kConfig, kFileExists))
     
    293274    //
    294275    MSequence seq(kSequence, kInpathD);
     276    if (!seq.IsMonteCarlo())
     277        seq.SetMonteCarlo(kIsMC);
    295278    if (kPrintSeq)
    296279    {
     
    310293    //
    311294    if (kPrintFiles)
    312         PrintFiles(seq, kInpathD, kDataType==MJCalib::kIsUseRawData, kFALSE);
     295        PrintFiles(seq, kInpathD, !seq.IsMonteCarlo(), kFALSE);
    313296    if (kPrintFound)
    314         PrintFiles(seq, kInpathD, kDataType==MJCalib::kIsUseRawData, kTRUE);
     297        PrintFiles(seq, kInpathD, !seq.IsMonteCarlo(), kTRUE);
    315298
    316299    if (seq.HasMoon())
     
    381364        job1.SetDisplay(d);
    382365        job1.SetOverwrite(kOverwrite);
    383         job1.SetDataType(kDataType);
    384366        job1.SetUseHists(kMoon);
    385367
     
    411393        job2.SetDisplay(d);;
    412394        job2.SetOverwrite(kOverwrite);
    413         job2.SetDataType(kDataType);
    414395        job2.SetUseHists(kMoon);
    415396        job2.SetDeadPixelCheck();
     
    447428        job3.SetOverwrite(kOverwrite);
    448429        job3.SetPathOut(kOutpathC);
    449         job3.SetDataType(kDataType);
    450430        // job2.SetPathIn(kInpathC); // not yet needed
    451431
     
    479459            job4.SetOverwrite(kOverwrite);
    480460            job4.SetPathOut(kOutpathC);
    481             job4.SetDataType(kDataType);
    482461
    483462            if (!job4.Process(job1.GetPedestalCam()))
     
    514493        job1.SetOverwrite(kOverwrite);
    515494        job1.SetPathIn(kInpathY);   // --> READ Extractor from calib-file
    516         job1.SetDataType(kDataType);
    517495        //job1.SetPathOut(kOutpathY);   // not yet needed
    518496        job1.SetUseData();
     
    544522        job2.SetOverwrite(kOverwrite);
    545523        job2.SetPathIn(kInpathY);
    546         job2.SetDataType(kDataType);
    547         job2.SetPulsePosCheck(kDataType!=MJCalib::kIsUseMC);
     524        job2.SetPulsePosCheck(!seq.IsMonteCarlo());
    548525        job2.SetPathOut(kOutpathY); // for updating the extractor
    549526
     
    600577        job3.SetOverwrite(kOverwrite);
    601578        job3.SetPathIn(kInpathY);
    602         job3.SetDataType(kDataType);
    603579        // job1.SetPathOut(kOutpathC); // not yet needed
    604580        // job1.SetPathIn(kInpathC);   // not yet needed
     
    634610        job4.SetPathIn(kInpathY);
    635611        job4.SetPathOut(kOutpathY);
    636         job4.SetDataType(kDataType);
    637612        job4.SetMovieMode(kMovie);
    638         if (kDataType!=MJCalib::kIsUseMC)
     613        if (!seq.IsMonteCarlo())
    639614            job4.SetExtractor(job2.GetExtractor());
    640615
Note: See TracChangeset for help on using the changeset viewer.