Ignore:
Timestamp:
01/31/05 16:04:49 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r6084 r6150  
    4444
    4545#include "MDirIter.h"
     46#include "MRunIter.h"
    4647#include "MParList.h"
    4748#include "MTaskList.h"
     
    116117//
    117118MJCalibrateSignal::MJCalibrateSignal(const char *name, const char *title)
    118   : fDataFlag(0), fIsInterlaced(kTRUE), fIsRelTimesUpdate(kFALSE), fIsHiLoCalibration(kFALSE)
     119  : fRuns(0), fIsInterlaced(kTRUE), fIsRelTimesUpdate(kFALSE), fIsHiLoCalibration(kFALSE)
    119120{
    120121    fName  = name  ? name  : "MJCalibrateSignal";
     
    213214    if (!fSequence.IsValid())
    214215    {
    215         *fLog << err << "ERROR - Sequence invalid!" << endl;
    216         return kFALSE;
     216        if (!fRuns)
     217        {
     218          *fLog << err << "ERROR - Sequence invalid and no runs chosen!" << endl;
     219          return kFALSE;
     220        }
     221
     222        if (fRuns->GetNumRuns() != fRuns->GetNumEntries())
     223        {
     224            *fLog << err << "Number of files found doesn't match number of runs... abort."
     225                << fRuns->GetNumRuns() << " vs. " << fRuns->GetNumEntries() << endl;
     226            return kFALSE;
     227        }
     228        *fLog << "Calibrate data from ";
     229        *fLog << "Runs " << fRuns->GetRunsAsString() << endl;
     230        *fLog << endl;
    217231    }
    218232
     
    339353    plist.AddToList(&tlist);
    340354
    341     /*
    342     TString name = iter.Next();
    343     Byte_t filetype = MRawFileRead::IsFileValid(name);
    344     if (!filetype)
    345         filetype = MReadMarsFile::IsFileValid(name)+1;
    346     if (filetype<1||filetype>3)
    347     {
    348         gLog << err << "ERROR - FileType #" << (int)filetype << " of first file " << name << " unknown..." << endl;
    349         return kFALSE;
    350     } */
    351 
    352355    MReadReports readreal;
    353356    readreal.AddTree("Events", "MTime.", kTRUE);
     
    362365    MRawFileRead rawread(NULL);
    363366    if (IsRawData())
    364         rawread.AddFiles(iter);
     367        rawread.AddFiles(fSequence.IsValid() ? iter : *fRuns);
    365368    else
    366         readreal.AddFiles(iter);
     369        readreal.AddFiles(fSequence.IsValid() ? iter : *fRuns);
    367370
    368371    MPointingPosInterpolate pextr;
Note: See TracChangeset for help on using the changeset viewer.