Changeset 8456


Ignore:
Timestamp:
04/27/07 14:17:37 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
5 edited

Legend:

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

    r8017 r8456  
    198198# Cut1.CalcDisp: No
    199199
     200# -------------------------------------------------------------------------
     201# Use this to executa a task (eg to estimate energy) after all Cuts
     202# -------------------------------------------------------------------------
     203# EstimateEnergy: MRanForestCalc
     204# EstimateEnergy.NameOutput: MEnergyEst
     205# EstimateEnergy.FileName: ranforest.root
     206# EstimateEnergy.Debug: No
  • trunk/MagicSoft/Mars/ganymed_onoff.rc

    r8017 r8456  
    170170# CalcDisp.Debug: No
    171171# Cut1.CalcDisp: No
     172
     173# -------------------------------------------------------------------------
     174# Use this to executa a task (eg to estimate energy) after all Cuts
     175# -------------------------------------------------------------------------
     176# EstimateEnergy: MRanForestCalc
     177# EstimateEnergy.NameOutput: MEnergyEst
     178# EstimateEnergy.FileName: ranforest.root
     179# EstimateEnergy.Debug: No
  • trunk/MagicSoft/Mars/ganymed_wobble.rc

    r8017 r8456  
    170170# CalcDisp.Debug: No
    171171# Cut1.CalcDisp: No
     172
     173# -------------------------------------------------------------------------
     174# Use this to executa a task (eg to estimate energy) after all Cuts
     175# -------------------------------------------------------------------------
     176# EstimateEnergy: MRanForestCalc
     177# EstimateEnergy.NameOutput: MEnergyEst
     178# EstimateEnergy.FileName: ranforest.root
     179# EstimateEnergy.Debug: No
  • trunk/MagicSoft/Mars/mjobs/MJCut.cc

    r8442 r8456  
    9090    : fStoreSummary(kFALSE), fStoreResult(kTRUE), fWriteOnly(kFALSE),
    9191    fFullDisplay(kTRUE),
    92     fRndmSrcPos(kFALSE), fNameHist("MHThetaSq"), fCalcHadronness(0), fCalcDisp(0)
     92    fRndmSrcPos(kFALSE), fNameHist("MHThetaSq"),
     93    fCalcHadronness(0), fCalcDisp(0), fEstimateEnergy(0)
    9394{
    9495    fName  = name  ? name  : "MJCut";
     
    102103MJCut::~MJCut()
    103104{
    104     //if (fEstimateEnergy)
    105     //    delete fEstimateEnergy;
     105    if (fEstimateEnergy)
     106        delete fEstimateEnergy;
    106107    if (fCalcHadronness)
    107108        delete fCalcHadronness;
     
    177178        delete fCalcDisp;
    178179    fCalcDisp = task ? (MTask*)task->Clone() : 0;
     180}
     181
     182// --------------------------------------------------------------------------
     183//
     184// Setup a task estimating the eneryg. The given task is cloned.
     185//
     186void MJCut::SetEnergyEstimator(const MTask *task)
     187{
     188    if (fEstimateEnergy)
     189        delete fEstimateEnergy;
     190    fEstimateEnergy = task ? (MTask*)task->Clone() : 0;
    179191}
    180192
     
    369381    write->AddContainer("OpticalAxis",    "Events", kFALSE);
    370382    write->AddContainer("Disp",           "Events", kFALSE);
     383    write->AddContainer("MEnergyEst",     "Events", kFALSE);
    371384    write->AddContainer("MTime",          "Events", kFALSE);
    372385    write->AddContainer("MMcEvt",         "Events", kFALSE);
     
    663676    MTaskEnv taskenv3("CalcDisp");
    664677    taskenv3.SetDefault(fCalcDisp);
     678
     679    MTaskEnv taskenv4("EstimateEnergy");
     680    taskenv4.SetDefault(fEstimateEnergy);
    665681
    666682    MParameterCalc setevtnum("MRawEvtHeader.fDAQEvtNumber", "SetEvtNumber");
     
    754770    }
    755771    tlist2.AddToList(&cont3);
     772    tlist2.AddToList(&taskenv4);
     773
    756774    if (write1)
    757775        tlist2.AddToList(write1);
  • trunk/MagicSoft/Mars/mjobs/MJCut.h

    r8442 r8456  
    3232    TString fNameHistFS;
    3333
    34     //MTask *fEstimateEnergy;
    3534    MTask  *fCalcHadronness;
    3635    MTask  *fCalcDisp;
     36    MTask  *fEstimateEnergy;
    3737
    3838    TString  GetOutputFile(UInt_t num) const;
     
    6969    void SetNameHistFS(const char *name) { fNameHistFS=name; }
    7070
    71     //void SetEnergyEstimator(const MTask *task=0);
     71    void SetEnergyEstimator(const MTask *task=0);
    7272    void SetHadronnessCalculator(const MTask *task=0);
    7373    void SetDispCalculator(const MTask *task=0);
Note: See TracChangeset for help on using the changeset viewer.