Changeset 19627


Ignore:
Timestamp:
Sep 5, 2019, 11:38:14 AM (2 weeks ago)
Author:
tbretz
Message:
Implemented the possiblity to read a file list instead of a sequence file (using the --list) option and specifying a file with the .txt ending
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/ceres.cc

    r17866 r19627  
    7676    gLog << "   --mode=calibration        calibration data (no input files required) or" << endl;
    7777    gLog << "   --mode=data               process data files [default]" << endl << endl;
    78     gLog << "   --run-number=#            Optionally set the run number of the run to simulate" << endl;
    79     gLog << "   --fits                    Write FITS output files instead of root files." << endl << endl;
     78    gLog << "   --run-number=#            Optionally set the run number to simulate" << endl;
     79    gLog << "   --fits                    Write FITS output files instead of root files." << endl;
     80    gLog << "   --list                    The specified .txt file contains a file list" << endl;
     81    gLog << "                              (see MDirIter::ReadFile)." << endl << endl;
    8082    gLog << endl;
    8183//    gLog << "     -f:  force reading of runheader" << endl;
     
    177179    const TString kOpMode     = arg.GetStringAndRemove("--mode=", "data");
    178180    const Bool_t  kFitsFile   = arg.HasOnlyAndRemove("--fits");
     181    const Bool_t  kFileList   = arg.HasOnlyAndRemove("--list");
    179182
    180183    Int_t opmode = -1;
     
    274277    // Setup sequence and check its validity
    275278    //
    276     MSequence seq(kSequence, kInpath);
    277     if (!kSequence.IsNull())
     279    MSequence seq(kFileList ? "" : kSequence, kInpath);
     280    if (!kSequence.IsNull() && !kFileList)
    278281    {
    279282        if (kPrintSeq)
     
    305308    else
    306309    {
     310        if (kFileList)
     311        {
     312            arg.RemoveArgument(0);
     313
     314            MDirIter Next;
     315            Next.ReadList(kSequence);
     316
     317            TString name;
     318            while (!(name=Next()).IsNull())
     319                arg.AddEntry(name);
     320        }
     321
    307322        if (kPrintFiles)
    308323            PrintFiles(arg, kFALSE);
Note: See TracChangeset for help on using the changeset viewer.