Changeset 5161 for trunk/MagicSoft


Ignore:
Timestamp:
10/01/04 19:12:42 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mjobs
Files:
4 edited

Legend:

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

    r5157 r5161  
    6969#include "MReadReports.h"
    7070#include "MReadMarsFile.h"
     71#include "MRawFileRead.h"
    7172#include "MGeomApply.h"
    7273#include "MMcPedestalCopy.h"
     
    171172}
    172173
    173 Bool_t MJCalibrateSignal::ProcessFile(MPedestalCam &pedcam, Bool_t ismc)
     174Bool_t MJCalibrateSignal::ProcessFile(MPedestalCam &pedcam)
    174175{
    175176    if (!fSequence.IsValid())
     
    274275    plist.AddToList(&tlist);
    275276
     277    // FIXME: Move this to an intermediate class MJMagic
     278    TString name = iter.Next();
     279    Byte_t filetype = MRawFileRead::IsFileValid(name);
     280    if (!filetype)
     281        filetype = MReadMarsFile::IsFileValid(name)+1;
     282    if (filetype==1||filetype>3)
     283    {
     284        gLog << err << "ERROR - FileType of first file " << name << " unknown..." << endl;
     285        return kFALSE;
     286    }
     287    // 1 = raw-file
     288    // 2 = raw-root file
     289    // 3 = mc-raw file
     290
    276291    MReadReports readreal;
    277292    readreal.AddTree("Events", "MTime.", kTRUE);
     
    286301    readmc.DisableAutoScheme();
    287302    readmc.AddFiles(iter);
     303
     304    MRawFileRead readraw(NULL);
     305    readraw.AddFiles(iter);
    288306
    289307    MGeomApply             apply; // Only necessary to create geometry
     
    298316    taskenv2.SetDefault(extractor2);
    299317    MCalibrateData         calib;
    300     if (ismc)
     318    if (filetype==3)
    301319        calib.SetCalibrationMode(MCalibrateData::kFfactor);
    302320    MCalibrateRelTimes     caltm;
     
    370388    tlist2.AddToList(&apply);
    371389    tlist2.AddToList(&merge);
    372     tlist2.AddToList(ismc ? (MTask*)&pcopy : (MTask*)&pedlo);
     390    tlist2.AddToList(filetype==3 ? (MTask*)&pcopy : (MTask*)&pedlo);
    373391    tlist2.AddToList(&fill0);
    374392    if (extractor1)
     
    391409
    392410    // Now setup main tasklist
    393     tlist.AddToList(ismc ? (MTask*)&readmc : (MTask*)&readreal);
     411    switch (filetype)
     412    {
     413    case 1: tlist.AddToList(&readraw);  break;
     414    case 2: tlist.AddToList(&readreal); break;
     415    case 3: tlist.AddToList(&readmc);   break;
     416    }
     417
    394418    tlist.AddToList(&tlist2, "Events");
    395419    tlist.AddToList(&pcalc,  "Drive");
  • trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.h

    r5030 r5161  
    2626    MJCalibrateSignal(const char *name=NULL, const char *title=NULL);
    2727
    28     Bool_t ProcessFile(MPedestalCam &cam, Bool_t ismc=kFALSE);
     28    Bool_t ProcessFile(MPedestalCam &cam);
    2929
    3030    ClassDef(MJCalibrateSignal, 0) // Tool to create a pedestal file (MPedestalCam)
  • trunk/MagicSoft/Mars/mjobs/MJCalibration.cc

    r5135 r5161  
    14961496    if (fSequence.IsValid())
    14971497    {
    1498         const Int_t n0 = fSequence.SetupCalRuns(iter, fPathData);
     1498        const Int_t n0 = fSequence.SetupCalRuns(iter, fPathData, IsDataCheck());
    14991499        const Int_t n1 = fSequence.GetNumCalRuns();
    15001500        if (n0==0)
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.cc

    r5153 r5161  
    575575    if (fSequence.IsValid())
    576576    {
    577         const Int_t n0 = fUseData ? fSequence.SetupDatRuns(iter, fPathData) : fSequence.SetupPedRuns(iter, fPathData);
     577        const Int_t n0 = fUseData ? fSequence.SetupDatRuns(iter, fPathData, fDataCheck) : fSequence.SetupPedRuns(iter, fPathData, fDataCheck);
    578578        const Int_t n1 = fUseData ? fSequence.GetNumDatRuns() : fSequence.GetNumPedRuns();
    579579        if (n0==0)
Note: See TracChangeset for help on using the changeset viewer.