Ignore:
Timestamp:
10/27/06 19:36:19 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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);
Note: See TracChangeset for help on using the changeset viewer.