Changeset 19848 for trunk/Mars/ceres.cc


Ignore:
Timestamp:
11/01/19 14:18:10 (5 years ago)
Author:
tbretz
Message:
Make a public access to MCorsikaRead::CalcNumEvents possible. This allows to use it to check whether all files are valid. Added the new option '--check' to ceres for that. Copy '-tel' to the file names. This is more conevenient in reading them.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/ceres.cc

    r19728 r19848  
    148148    gLog.Setup(arg);
    149149
    150     StartUpMessage();
     150    const Bool_t kCheckOnly = arg.HasOnlyAndRemove("--check");
     151
     152    if (!kCheckOnly)
     153        StartUpMessage();
    151154
    152155    if (arg.HasOnly("-V") || arg.HasOnly("--version"))
     
    159162    }
    160163
    161     const Bool_t  kBatch      = arg.HasOnlyAndRemove("-b");
     164    const Bool_t  kBatch      = arg.HasOnlyAndRemove("-b") || kCheckOnly;
    162165    //const Int_t   kCompLvl   = arg.GetIntAndRemove("--comp=", 1);
    163     const Bool_t  kForce      = arg.HasOnlyAndRemove("-ff");
     166    const Bool_t  kForce      = arg.HasOnlyAndRemove("-ff") && !kCheckOnly;
    164167    const Bool_t  kDebugMem   = arg.HasOnlyAndRemove("--debug-mem");
    165168    const Bool_t  kNullOut    = arg.HasOnlyAndRemove("--dev-null");
     
    340343    MArray::Class()->IgnoreTObjectStreamer();
    341344    MParContainer::Class()->IgnoreTObjectStreamer();
     345
     346    if (kCheckOnly)
     347        gROOT->SetBatch();
    342348
    343349    TApplication app("ceres", &argc, argv);
     
    381387        // job.SetPathIn(kInpath); // not yet needed
    382388
    383         if (!job.Process(arg, seq))
    384         {
    385             gLog << err << "Calculation of ceres failed." << endl << endl;
     389        if (!job.Process(arg, seq, kCheckOnly))
     390        {
     391            if (job.GetDisplay())
     392                delete d;
     393
     394            if (!kCheckOnly)
     395                gLog << err << "Calculation of ceres failed." << endl << endl;
    386396            return 2;
    387397        }
Note: See TracChangeset for help on using the changeset viewer.