Changeset 4695


Ignore:
Timestamp:
08/20/04 16:15:37 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r4694 r4695  
    2222 2004/08/20: Thomas Bretz
    2323
     24   * mjobs/MSequence.[h,cc]:
     25     - added path-option to SetupRuns
     26
     27   * mjobs/MJCalibration.cc, mjobs/MJExtractSignal.cc, MJPedestal.cc:
     28     - changed file "UPDATE" to "RECREATE"
     29 
    2430   * macros/sql/filldotrbk.C:
    2531     - removed obsolete output
  • trunk/MagicSoft/Mars/mjobs/JobsLinkDef.h

    r4601 r4695  
    99#pragma link C++ class MJPedestal+;
    1010#pragma link C++ class MJCalibration+;
     11#pragma link C++ class MJCalibrateSignal+;
    1112#pragma link C++ class MJExtractSignal+;
    1213#pragma link C++ class MJExtractCalibTest+;
  • trunk/MagicSoft/Mars/mjobs/MJCalibration.cc

    r4688 r4695  
    14251425    {
    14261426        read.DisableAutoScheme();
    1427         static_cast<MRead&>(read).AddFiles(fSequence ? iter : *fRuns);
     1427        read.AddFiles(fSequence ? iter : *fRuns);
    14281428        tlist.AddToList(&read);
    14291429    }
     
    17021702    *fLog << inf << "Writing to file: " << oname << endl;
    17031703
    1704     TFile file(oname, "UPDATE");
     1704    TFile file(oname, "RECREATE");
    17051705
    17061706    *fLog << inf << " - MStatusDisplay..." << flush;
  • trunk/MagicSoft/Mars/mjobs/MJExtractSignal.cc

    r4445 r4695  
    8989    *fLog << inf << "Writing to file: " << oname << endl;
    9090
    91     TFile file(oname, "UPDATE");
     91    TFile file(oname, "RECREATE");
    9292
    9393    if (fDisplay && fDisplay->Write()<=0)
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.cc

    r4641 r4695  
    451451    *fLog << inf << "Writing to file: " << oname << endl;
    452452
    453     TFile file(oname, "UPDATE");
     453    TFile file(oname, "RECREATE");
    454454
    455455    if (fDisplay && fDisplay->Write()<=0)
     
    560560        read.DisableAutoScheme();
    561561        if (fRuns || fSequence)
    562             static_cast<MRead&>(read).AddFiles(fSequence ? iter : *fRuns);
     562            read.AddFiles(fSequence ? iter : *fRuns);
    563563        tlist.AddToList(&read);
    564564    }
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.h

    r4641 r4695  
    4242    TEnv       *fEnv;           // Input setup-file
    4343    MRunIter   *fRuns;          // Used pedestal runs
    44     MSequence  *fSequence;      // Sequence
     44    const MSequence  *fSequence;      // Sequence
    4545
    4646    MExtractor *fExtractor;     // Signal extractor, used to find the nr. of used FADC slices
     
    8484    void SetExtractor(MExtractor* ext) { fExtractor = ext; }
    8585    void SetInput(MRunIter *iter) { fRuns = iter; }
    86     void SetSequence(MSequence *seq, Bool_t usedata=kFALSE) { fSequence = seq; }
     86    void SetSequence(const MSequence *seq, Bool_t usedata=kFALSE) { fSequence = seq; }
    8787    void SetOutputPath(const char *path=".");
    8888    void SetEnv(const char *env);
  • trunk/MagicSoft/Mars/mjobs/MSequence.cc

    r4601 r4695  
    6363}
    6464
    65 void MSequence::SetupRuns(MDirIter &iter, const TArrayI &arr) const
     65void MSequence::SetupRuns(MDirIter &iter, const TArrayI &arr, const char *path) const
    6666{
     67    TString d(path);
     68
     69    // Setup path
     70    if (!path)
     71    {
     72        d  = Form("/data/MAGIC/Period%03d/rootdata/", fPeriod);
     73        d += fNight.GetStringFmt("%Y_%m_%d");
     74    }
     75
    6776    for (int i=0; i<arr.GetSize(); i++)
    6877    {
    69         TString d, n;
    70         d  = "/data/MAGIC/Period";
    71         d += Form("%03d", fPeriod);
    72         d += "/rootdata/";
    73         d += fNight.GetStringFmt("%Y_%m_%d");
     78        TString n;
     79
     80        // Create file name
    7481        n =  fNight.GetStringFmt("%Y%m%d_");
    75         n += Form("%05d", arr[i]);
    76         n += "_*_E.root";
     82        n += Form("%05d_*_E.root", arr[i]);
    7783
     84        // Add Path/File to TIter
    7885        iter.AddDirectory(d, n, 0);
    7986    }
     
    146153}
    147154
    148 void MSequence::SetupPedRuns(MDirIter &iter) const
     155void MSequence::SetupPedRuns(MDirIter &iter, const char *path) const
    149156{
    150     SetupRuns(iter, fPedRuns);
     157    SetupRuns(iter, fPedRuns, path);
    151158}
    152159
    153 void MSequence::SetupDatRuns(MDirIter &iter) const
     160void MSequence::SetupDatRuns(MDirIter &iter, const char *path) const
    154161{
    155     SetupRuns(iter, fDatRuns);
     162    SetupRuns(iter, fDatRuns, path);
    156163}
    157164
    158 void MSequence::SetupAllRuns(MDirIter &iter) const
     165void MSequence::SetupAllRuns(MDirIter &iter, const char *path) const
    159166{
    160     SetupRuns(iter, fRuns);
     167    SetupRuns(iter, fRuns, path);
    161168}
    162169
    163 void MSequence::SetupCalRuns(MDirIter &iter) const
     170void MSequence::SetupCalRuns(MDirIter &iter, const char *path) const
    164171{
    165     SetupRuns(iter, fCalRuns);
     172    SetupRuns(iter, fCalRuns, path);
    166173}
  • trunk/MagicSoft/Mars/mjobs/MSequence.h

    r4609 r4695  
    3636
    3737    void Split(TString &runs, TArrayI &data) const;
    38     void SetupRuns(MDirIter &iter, const TArrayI &arr) const;
     38    void SetupRuns(MDirIter &iter, const TArrayI &arr, const char *path) const;
    3939
    4040public:
     
    4343    void Print(Option_t *o="") const;
    4444
    45     void SetupPedRuns(MDirIter &iter) const;
    46     void SetupDatRuns(MDirIter &iter) const;
    47     void SetupAllRuns(MDirIter &iter) const;
    48     void SetupCalRuns(MDirIter &iter) const;
     45    void SetupPedRuns(MDirIter &iter, const char *path=0) const;
     46    void SetupDatRuns(MDirIter &iter, const char *path=0) const;
     47    void SetupAllRuns(MDirIter &iter, const char *path=0) const;
     48    void SetupCalRuns(MDirIter &iter, const char *path=0) const;
    4949
    5050    // Getter
  • trunk/MagicSoft/Mars/mjobs/Makefile

    r4601 r4695  
    2828           MJPedestal.cc \
    2929           MJCalibration.cc \
     30           MJCalibrateSignal.cc \
    3031           MJExtractSignal.cc \
    3132           MJExtractCalibTest.cc
Note: See TracChangeset for help on using the changeset viewer.