Changeset 8441


Ignore:
Timestamp:
04/24/07 15:02:50 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/ganymed.cc

    r8088 r8441  
    201201    //
    202202    MDataSet seq(kSequences, kPathSequences, kPathDataFiles);
     203    if (!seq.IsMonteCarlo())
     204        seq.SetMonteCarlo(kIsMc);
    203205    if (kNumAnalysis>=0)
    204206        seq.SetNumAnalysis(kNumAnalysis);
     
    267269    //if (kFullDisplay)
    268270    //    job.EnableFullDisplay(kFullDisplay);
    269     job.EnableMonteCarloMode(kIsMc);
    270271    job.EnableStorageOfResult(!kSkipResult);
    271272    if (kWriteSummary) // Don't change flag set in SetNameSummaryFile
  • trunk/MagicSoft/Mars/mjobs/MDataSet.cc

    r8389 r8441  
    1818!   Author(s): Thomas Bretz, 1/2005 <mailto:tbretz@astro.uni-wuerzburg.de>
    1919!
    20 !   Copyright: MAGIC Software Development, 2004-2005
     20!   Copyright: MAGIC Software Development, 2004-2007
    2121!
    2222!
     
    6767//   * Sequence filenames should also have names allowing to order them
    6868//     in time, but it is not necessary.
     69//
     70// Class Version 2:
     71//  + fMonteCarlo
     72//  + fWobbleMode
     73//  - fIsWobbleMode
    6974//
    7075/////////////////////////////////////////////////////////////////////////////
     
    97102using namespace std;
    98103
    99 const TString MDataSet::fgCatalog       = "/magic/datacenter/setup/magic_favorites.edb";
    100 const TString MDataSet::fgPathDataFiles = "/magic/data/star";
    101 const TString MDataSet::fgPathSequences = "/magic/sequences";
     104const TString MDataSet::fgCatalog = "/magic/datacenter/setup/magic_favorites.edb";
    102105
    103106// --------------------------------------------------------------------------
     
    217220    Split(str, fNumSequencesOff);
    218221
    219     SetupDefaultPath(sequences, fgPathSequences);
    220     SetupDefaultPath(data,      fgPathDataFiles);
     222    fNameSource   = env.GetValue("SourceName", "");
     223    fCatalog      = env.GetValue("Catalog",    fgCatalog);
     224    fWobbleMode   = env.GetValue("WobbleMode", kFALSE);
     225    fMonteCarlo   = env.GetValue("MonteCarlo", kFALSE);
     226    fComment      = env.GetValue("Comment",    "");
     227
     228    SetupDefaultPath(sequences, GetDefPathSequences());
     229    SetupDefaultPath(data,      GetDefPathDataFiles());
    221230
    222231    fPathSequences = sequences;
     
    225234    ResolveSequences(env, fNumSequencesOn,  fSequencesOn);
    226235    ResolveSequences(env, fNumSequencesOff, fSequencesOff);
    227 
    228     fNameSource   = env.GetValue("SourceName", "");
    229     fCatalog      = env.GetValue("Catalog",    fgCatalog);
    230     fIsWobbleMode = env.GetValue("WobbleMode", kFALSE);
    231     fComment      = env.GetValue("Comment",    "");
    232236
    233237    fNameSource = fNameSource.Strip(TString::kBoth);
     
    287291    gLog << "Catalog: " << fCatalog << endl;
    288292
    289     gLog << "WobbleMode: " << (fIsWobbleMode?"On":"Off") << endl << endl;
    290 
    291 
     293    gLog << "WobbleMode: " << (fWobbleMode?"On":"Off") << endl << endl;
     294    gLog << "MonteCarlo: " << (fMonteCarlo?"Yes":"No") << endl << endl;
    292295
    293296    gLog << "Comment: " << fComment << endl;
  • trunk/MagicSoft/Mars/mjobs/MDataSet.h

    r8398 r8441  
    2020{
    2121private:
    22     static const TString fgCatalog;       //! Default Catalog path
    23     static const TString fgPathDataFiles; //! Default path to data files
    24     static const TString fgPathSequences; //! Default path to sequences
     22    static const TString fgCatalog; //! Default Catalog path
    2523
    2624    UInt_t  fNumAnalysis;     // Analysis number (artificial)
     
    4038    TString fComment;         // Comment from DS file
    4139
    42     Bool_t  fIsWobbleMode;    // Wobble Mode for this dataset?
     40    Bool_t  fWobbleMode;      // Wobble Mode for this dataset?
     41    Bool_t  fMonteCarlo;      // For default paths use MC or data path
    4342
    4443    void Split(TString &runs, TArrayI &data) const;
     
    7877        ds.fCatalog = fCatalog;
    7978        ds.fComment = fComment;
    80         ds.fIsWobbleMode = fIsWobbleMode;
     79        ds.fWobbleMode = fWobbleMode;
     80        ds.fMonteCarlo = fMonteCarlo;
    8181
    8282        TObject *o=0;
     
    112112    Bool_t GetSourcePos(MPointingPos &pos) const;
    113113
    114     Bool_t IsWobbleMode() const { return fIsWobbleMode; }
     114    Bool_t IsWobbleMode() const { return fWobbleMode; }
     115    Bool_t IsMonteCarlo() const { return fMonteCarlo; }
     116
     117    const char *GetDefPathDataFiles() const { return fMonteCarlo ? "/magic/montecarlo/star"      : "/magic/data/star"; }
     118    const char *GetDefPathSequences() const { return fMonteCarlo ? "/magic/montecarlo/sequences" : "/magic/sequences"; }
    115119
    116120    // Setter
     121    void SetMonteCarlo(Bool_t ismc=kTRUE) { fMonteCarlo=ismc; }
     122
    117123    static Bool_t AddSequencesFromList(const TList &list, MDirIter &files);
    118124    static Int_t  AddFilesToChain(MDirIter &files, TChain &chain);
     
    144150    void Print(Option_t *o="") const; //*MENU*
    145151
    146     ClassDef(MDataSet, 1)
     152    ClassDef(MDataSet, 2)
    147153};
    148154
  • trunk/MagicSoft/Mars/mjobs/MJCut.cc

    r8440 r8441  
    9191MJCut::MJCut(const char *name, const char *title)
    9292    : fStoreSummary(kFALSE), fStoreResult(kTRUE), fWriteOnly(kFALSE),
    93     fIsWobble(kFALSE), fIsMonteCarlo(kFALSE),  fFullDisplay(kTRUE),
     93    fIsWobble(kFALSE), fFullDisplay(kTRUE),
    9494    fRndmSrcPos(kFALSE), fNameHist("MHThetaSq"), fCalcHadronness(0), fCalcDisp(0)
    9595{
     
    331331    EnableStorageOfResult(GetEnv("ResultFile", fStoreResult));
    332332    EnableWobbleMode(GetEnv("WobbleMode", fIsWobble));
    333     EnableMonteCarloMode(GetEnv("MonteCarlo", fIsMonteCarlo));
    334333    EnableFullDisplay(GetEnv("FullDisplay", fFullDisplay));
    335334    EnableRandomSrcPos(GetEnv("RandomSourcePosition", fRndmSrcPos));
     
    643642    readoffmc.DisableAutoScheme();
    644643
    645     MRead &readoff = fIsMonteCarlo ? (MRead&)readoffmc : (MRead&)readoffdata;
     644    MRead &readoff = set.IsMonteCarlo() ? (MRead&)readoffmc : (MRead&)readoffdata;
    646645    const Bool_t setrc = fIsWobble ? set.AddFilesOn(readoff) : set.AddFilesOff(readoff);
    647646    if (!setrc && set.HasOffSequences())
     
    831830    readonmc.DisableAutoScheme();
    832831
    833     MRead &readon = fIsMonteCarlo ? (MRead&)readonmc : (MRead&)readondata;
     832    MRead &readon = set.IsMonteCarlo() ? (MRead&)readonmc : (MRead&)readondata;
    834833    if (!set.AddFilesOn(readon))
    835834        return kFALSE;
     
    873872    hvs.SetTitle("Effective On-Time vs. Zenith Angle;\\Theta [\\circ];T_{on} [s]");
    874873    MFillH fillvs(&hvs, "", "FillOnTime");
    875     if (!fIsMonteCarlo)
     874    if (!set.IsMonteCarlo())
    876875        fillvs.SetWeight("MEffectiveOnTime");
    877876    fillvs.SetNameTab("OnTime");
     
    946945        }
    947946
    948         if (!fIsMonteCarlo)
     947        if (!set.IsMonteCarlo())
    949948            tlist.AddToList(&fillvs, "EffectiveOnTime");
    950949        else
  • trunk/MagicSoft/Mars/mjobs/MJCut.h

    r8244 r8441  
    2222    Bool_t  fWriteOnly;
    2323    Bool_t  fIsWobble;
    24     Bool_t  fIsMonteCarlo;
    2524    Bool_t  fFullDisplay;
    2625    Bool_t  fRndmSrcPos;
     
    6160    void EnableWriteOnly(Bool_t b=kTRUE)         { fWriteOnly    = b; }
    6261    void EnableWobbleMode(Bool_t b=kTRUE)        { fIsWobble     = b; }
    63     void EnableMonteCarloMode(Bool_t b=kTRUE)    { fIsMonteCarlo = b; }
    6462    void EnableFullDisplay(Bool_t b=kTRUE)       { fFullDisplay  = b; }
    6563    void EnableRandomSrcPos(Bool_t b=kTRUE)      { fRndmSrcPos   = b; }
Note: See TracChangeset for help on using the changeset viewer.