Changeset 8172 for trunk/MagicSoft


Ignore:
Timestamp:
10/27/06 19:36:19 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8170 r8172  
    3030     - do not print observation time statistics if observation time is
    3131       zero
     32
     33   * mjobs/MJSpectrum.[h,cc]:
     34     - added reading and usage of "CalcHadronness" when processing
     35       the MCs
    3236
    3337
  • trunk/MagicSoft/Mars/mjobs/MJSpectrum.cc

    r8047 r8172  
    8686MJSpectrum::MJSpectrum(const char *name, const char *title)
    8787    : fCut0(0),fCut1(0), fCut2(0), fCut3(0), fEstimateEnergy(0),
    88     fRefill(kFALSE), fSimpleMode(kTRUE), fRawMc(kFALSE),
    89     fNoThetaWeights(kFALSE)
     88    fCalcHadronness(0), fRefill(kFALSE), fSimpleMode(kTRUE),
     89    fRawMc(kFALSE), fNoThetaWeights(kFALSE)
    9090{
    9191    fName  = name  ? name  : "MJSpectrum";
     
    105105    if (fEstimateEnergy)
    106106        delete fEstimateEnergy;
     107    if (fCalcHadronness)
     108        delete fCalcHadronness;
    107109}
    108110
     
    118120}
    119121
    120 Bool_t MJSpectrum::ReadTask(MTask* &task, const char *name) const
     122Bool_t MJSpectrum::ReadTask(MTask* &task, const char *name, Bool_t mustexist) const
    121123{
    122124    if (task)
     
    129131    if (!task)
    130132    {
     133        if (!mustexist)
     134            return kTRUE;
    131135        *fLog << err << dbginf << "ERROR - " << name << " doen't exist in file!" << endl;
    132136        return kFALSE;
     
    247251        return -1;
    248252    if (!ReadTask(fCut3, "Cut3"))
     253        return -1;
     254    if (!ReadTask(fCalcHadronness, "CalcHadronness", kFALSE))
    249255        return -1;
    250256
     
    11791185    fill8a.SetWeight();
    11801186
     1187    MTaskEnv taskenv0("CalcHadronness");
     1188    taskenv0.SetDefault(fCalcHadronness);
     1189
    11811190    MEnergyEstimate est;
    11821191    MTaskEnv taskenv1("EstimateEnergy");
     
    11961205    tlist2.AddToList(&fill30);
    11971206    tlist2.AddToList(fCut0);
     1207    tlist2.AddToList(&taskenv0);
    11981208    tlist2.AddToList(fCut1);
    11991209    tlist2.AddToList(fCut2);
  • trunk/MagicSoft/Mars/mjobs/MJSpectrum.h

    r7404 r8172  
    2929    MTask *fCut3;
    3030    MTask *fEstimateEnergy;
     31    MTask *fCalcHadronness;
    3132
    3233    Bool_t fRefill;
     
    3637
    3738    // Read Input
    38     Bool_t  ReadTask(MTask* &task, const char *name) const;
     39    Bool_t  ReadTask(MTask* &task, const char *name, Bool_t mustexist=kTRUE) const;
    3940    Float_t ReadInput(MParList &plist, TH1D &h1, TH1D &size);
    4041    Bool_t  ReadOrigMCDistribution(const MDataSet &set, TH1 &h, MMcSpectrumWeight &w) const;
Note: See TracChangeset for help on using the changeset viewer.