Ignore:
Timestamp:
07/14/08 20:59:13 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mjobs
Files:
7 edited

Legend:

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

    r8498 r8999  
    4242#include "MLogManip.h"
    4343
    44 #include "MRunIter.h"
    4544#include "MParList.h"
    4645#include "MTaskList.h"
  • trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc

    r8988 r8999  
    410410    MTriggerPatternDecode     decode;
    411411
    412     MH3 hpat("MRawRunHeader.fRunNumber", "MTriggerPattern.GetUnprescaled");
    413     hpat.SetWeight("1./MRawRunHeader.GetRunLength");
     412    MH3 hpat("MRawRunHeader.GetFileID", "MTriggerPattern.GetUnprescaled");
     413    hpat.SetWeight("1./TMath::Max(MRawRunHeader.GetRunLength,1)");
    414414    hpat.SetName("TrigPat");
    415     hpat.SetTitle("Rate of the trigger pattern [Hz];Run Number;Trigger Pattern;Rate [Hz]");
     415    hpat.SetTitle("Rate of the trigger pattern [Hz];File Id;Trigger Pattern;Rate [Hz]");
    416416    hpat.InitLabels(MH3::kLabelsXY);
    417417    //hpat.DefineLabelsY("1=Lvl1;2=Cal;3=Cal;4=Lvl2;5=Cal;7=Cal;8=Ped;9=Ped+Trig;13=Ped+Trig;16=Pin;32=Sum");
  • trunk/MagicSoft/Mars/mjobs/MJCalibration.cc

    r8990 r8999  
    105105
    106106#include "MEnv.h"
    107 #include "MRunIter.h"
     107#include "MDirIter.h"
    108108#include "MSequence.h"
    109109#include "MParList.h"
  • trunk/MagicSoft/Mars/mjobs/MJExtractSignal.cc

    r4773 r8999  
    3838#include "MLogManip.h"
    3939
    40 #include "MRunIter.h"
    4140#include "MParList.h"
    4241#include "MTaskList.h"
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.cc

    r8990 r8999  
    5252#include "MLogManip.h"
    5353
     54#include "MDirIter.h"
    5455#include "MTaskEnv.h"
    5556#include "MSequence.h"
    56 #include "MRunIter.h"
    5757#include "MParList.h"
    5858#include "MTaskList.h"
  • trunk/MagicSoft/Mars/mjobs/MSequence.cc

    r8996 r8999  
    379379}
    380380
     381TString MSequence::InflateRunPath(const MTime &night, Bool_t mc)
     382{
     383    TString rc = GetStandardPath(mc);
     384    rc += "rawfiles/";
     385    rc += night.GetStringFmt("%Y/%m/%d/");
     386    return rc;
     387}
     388
     389TString MSequence::InflateRunPath(const MTime &night, UShort_t tel, Int_t run, Int_t file, Int_t type)
     390{
     391    return InflateRunPath(night)+InflateRunName(night, tel, run, file, type);
     392}
     393
    381394// --------------------------------------------------------------------------
    382395//
     
    421434}
    422435
    423 // --------------------------------------------------------------------------
    424 //
    425 // Return the expression describing the file-name for the file defined
    426 // by i-th entry of the the given arrays. The file type identifier is
    427 // defined by type. The source name is replaced by a wildcard and
    428 // the extension is defined by the type as well.
    429 //
    430 TString MSequence::GetFileName(UInt_t i, const TArrayI &arr, const TArrayI &sub, FileType_t type) const
     436TString MSequence::InflateRunName(const MTime &night, UShort_t tel, Int_t run, Int_t file, Int_t type)
    431437{
    432438    const char *id="_";
     
    458464
    459465    // ------------- Create file name --------------
    460     TString n = fNight.GetStringFmt("%Y%m%d_");
    461 
    462     if (arr[i]>999999)
    463         n += "M1_";
    464 
    465     // R. DeLosReyes and T. Bretz
    466     // Changes to read the DAQ numbering format. Changes takes place
    467     // between runs 35487 and 00035488 (2004_08_30)
    468     n += Form(arr[i]>35487 || fMonteCarlo ? "%08d" : "%05d", arr[i]);
    469 
    470     if (arr[i]>999999 && sub.GetSize()>0)
    471         n += Form(".%05d", sub[i]);
     466    TString n = night.GetStringFmt("%Y%m%d_");
     467
     468    // This is for MCs (FIXME!!!!)
     469    if (run<0)
     470        n += Form("%08d", -run);
     471    else
     472    {
     473        if (tel>0)
     474            n += Form("M%d_", tel);
     475
     476        // R. DeLosReyes and T. Bretz
     477        // Changes to read the DAQ numbering format. Changes takes place
     478        // between runs 35487 and 00035488 (2004_08_30)
     479        n += Form(run>35487 ? "%08d" : "%05d", run);
     480
     481        if (tel>0)
     482            n += Form(".%05d", file);
     483    }
    472484
    473485    n += "_";
     
    475487    n += "_*";
    476488
    477     if (arr[i]<1000000)
     489    if (tel==0)
    478490        n += "_E";
    479491
     
    484496    case kRawCal:
    485497    case kRawAll:
    486         n += ".raw.?g?z?";
     498        n += ".raw.?g?z?";  // TPRegexp: (\.gz)?
    487499        break;
    488500    default:
     
    491503
    492504    return n;
     505}
     506
     507// --------------------------------------------------------------------------
     508//
     509// Return the expression describing the file-name for the file defined
     510// by i-th entry of the the given arrays. The file type identifier is
     511// defined by type. The source name is replaced by a wildcard and
     512// the extension is defined by the type as well.
     513//
     514TString MSequence::GetFileName(UInt_t i, const TArrayI &arr, const TArrayI &sub, FileType_t type) const
     515{
     516    const Int_t tel = 1;
     517    return InflateRunName(fNight, arr[i]>999999?tel:0, fMonteCarlo?-arr[i]:arr[i], sub.GetSize()>0?sub[i]:0, type);
    493518}
    494519
     
    11831208// Returns if file accessible or not.
    11841209//
    1185 Bool_t MSequence::InflatePath(TString &seq, Bool_t ismc)
     1210Bool_t MSequence::InflateSeq(TString &seq, Bool_t ismc)
    11861211{
    11871212    if (seq.IsDigit())
  • trunk/MagicSoft/Mars/mjobs/MSequence.h

    r8996 r8999  
    2727
    2828    UInt_t fSequence;          // Sequence number
     29
     30    // FIXME: UShort_t fTelescopeNumber ???
    2931
    3032    MTime  fStart;             // Start time of sequence
     
    170172    const TString &GetDataPath() const { return fDataPath; }
    171173
    172     const TString GetStandardPath() const { return fMonteCarlo?"/magic/montecarlo/":"/magic/data/"; }
     174    const TString  GetStandardPath() const { return GetStandardPath(fMonteCarlo); }
    173175
    174     static Bool_t InflatePath(TString &seq, Bool_t ismc=kFALSE);
     176    // Static function for external access
     177    static TString GetStandardPath(Bool_t mc) { return mc?"/magic/montecarlo/":"/magic/data/"; }
     178    static Bool_t  InflateSeq(TString &seq, /*FIXME: TELNUM*/ Bool_t ismc=kFALSE);
     179
     180    static TString InflateRunName(const MTime &night, UShort_t tel, Int_t run, Int_t file, Int_t type=kRawAll);
     181    static TString InflateRunName(const MTime &night, Int_t run, Int_t type=kRawAll) { return InflateRunName(night, 1, run, 0, type); }
     182
     183    static TString InflateRunPath(const MTime &night, UShort_t tel, Int_t run, Int_t file=0, Int_t type=kRawAll);
     184    static TString InflateRunPath(const MTime &night, Int_t run, Int_t type=kRawAll) { return InflateRunPath(night, 1, run, 0, type); }
     185
     186    static TString InflateRunPath(const MTime &night, Bool_t mc=kFALSE);
    175187
    176188    ClassDef(MSequence, 5) // Describes a sequences, reads and writes sequence files
Note: See TracChangeset for help on using the changeset viewer.