Ignore:
Timestamp:
11/21/05 11:09:12 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mjobs
Files:
4 edited

Legend:

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

    r7409 r7413  
    196196    fName  = fname;
    197197
     198    fSequencesOn.SetOwner();
     199    fSequencesOff.SetOwner();
     200
    198201    const char *expname = gSystem->ExpandPathName(fname);
    199202
  • trunk/MagicSoft/Mars/mjobs/MDataSet.h

    r7380 r7413  
    5454
    5555public:
    56     MDataSet() : fNumAnalysis((UInt_t)-1) { }
     56    MDataSet(Int_t num=(UInt_t)-1) : fNumAnalysis(num) { }
    5757    MDataSet(const char *fname, TString sequences="", TString data="");
     58
     59    void Copy(TObject &obj) const
     60    {
     61        MDataSet &ds = (MDataSet&)obj;
     62        ds.fNumAnalysis = fNumAnalysis;
     63        ds.fNumSequencesOn = fNumSequencesOn;
     64        ds.fNumSequencesOff = fNumSequencesOff;
     65        ds.fNameSource = fNameSource;
     66        ds.fCatalog = fCatalog;
     67        ds.fComment = fComment;
     68        ds.fIsWobbleMode = fIsWobbleMode;
     69
     70        TObject *o=0;
     71
     72        ds.fSequencesOn.Delete();
     73        ds.fSequencesOff.Delete();
     74
     75        TIter NextOn(&fSequencesOn);
     76        while ((o=NextOn()))
     77            ds.fSequencesOn.Add(o->Clone());
     78
     79        TIter NextOff(&fSequencesOff);
     80        while ((o=NextOff()))
     81            ds.fSequencesOff.Add(o->Clone());
     82    }
    5883
    5984    // Getter
  • trunk/MagicSoft/Mars/mjobs/MJCut.cc

    r7390 r7413  
    8686    : fStoreSummary(kFALSE), fStoreResult(kTRUE), fWriteOnly(kFALSE),
    8787    fIsWobble(kFALSE), fIsMonteCarlo(kFALSE),  fFullDisplay(kTRUE),
    88     fNameHist("MHThetaSq"), fCalcHadronness(0)
     88    fNameHist("MHThetaSq"), fCalcHadronness(0), fCalcDisp(0)
    8989{
    9090    fName  = name  ? name  : "MJCut";
     
    102102    if (fCalcHadronness)
    103103        delete fCalcHadronness;
     104    if (fCalcDisp)
     105        delete fCalcDisp;
    104106}
    105107
     
    160162        delete fCalcHadronness;
    161163    fCalcHadronness = task ? (MTask*)task->Clone() : 0;
     164}
     165
     166// --------------------------------------------------------------------------
     167//
     168// Setup a task calculating disp. The given task is cloned.
     169//
     170void MJCut::SetDispCalculator(const MTask *task)
     171{
     172    if (fCalcDisp)
     173        delete fCalcDisp;
     174    fCalcDisp = task ? (MTask*)task->Clone() : 0;
    162175}
    163176
     
    540553    taskenv2.SetDefault(fCalcHadronness);
    541554
     555    MTaskEnv taskenv3("CalcDisp");
     556    taskenv3.SetDefault(fCalcDisp);
     557
    542558    MFillH fill1a("MHHillasOffPre  [MHHillas]",      "MHillas",      "FillHillasPre");
    543559    MFillH fill2a("MHHillasOffPost [MHHillas]",      "MHillas",      "FillHillasPost");
     
    579595    //tlist2.AddToList(&taskenv1);
    580596    tlist2.AddToList(&taskenv2);
     597    tlist2.AddToList(&taskenv3);
    581598    tlist2.AddToList(&cont0);
    582599    if (write0)
  • trunk/MagicSoft/Mars/mjobs/MJCut.h

    r7109 r7413  
    3333    //MTask *fEstimateEnergy;
    3434    MTask *fCalcHadronness;
     35    MTask *fCalcDisp;
    3536
    3637    TString  GetOutputFile(UInt_t num) const;
     
    6869    //void SetEnergyEstimator(const MTask *task=0);
    6970    void SetHadronnessCalculator(const MTask *task=0);
     71    void SetDispCalculator(const MTask *task=0);
    7072
    7173    ClassDef(MJCut, 0) // Standard program to perform g/h-separation cuts
Note: See TracChangeset for help on using the changeset viewer.