Changeset 2206


Ignore:
Timestamp:
06/23/03 11:01:53 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
111 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/manalysis/MBlindPixelCalc.cc

    r2173 r2206  
    107107//    from the monte carlo run header.
    108108//
    109 Bool_t MBlindPixelCalc::PreProcess (MParList *pList)
     109Int_t MBlindPixelCalc::PreProcess (MParList *pList)
    110110{
    111111    if (TESTBIT(fFlags, kUseBlindPixels))
     
    252252// Treat the blind pixels
    253253//
    254 Bool_t MBlindPixelCalc::Process()
     254Int_t MBlindPixelCalc::Process()
    255255{
    256256    if (TESTBIT(fFlags, kUseInterpolation) && fGeomCam)
  • trunk/MagicSoft/Mars/manalysis/MBlindPixelCalc.h

    r1574 r2206  
    3636    void StreamPrimitive(ofstream &out) const;
    3737
     38    Int_t PreProcess(MParList *pList);
     39    Int_t Process();
     40
    3841public:
    3942    MBlindPixelCalc(const char *name=NULL, const char *title=NULL);
     
    5255    }
    5356
    54     Bool_t PreProcess(MParList *pList);
    55     Bool_t Process();
    56 
    5757    void SetPixels(Int_t num, Short_t *ids);
    5858    void SetPixels(const TArrayS pix) { SetPixels((Int_t)pix.GetSize(), (Short_t*)pix.GetArray()); }
  • trunk/MagicSoft/Mars/manalysis/MCT1PadONOFF.cc

    r2196 r2206  
    891891//  Set the pointers and prepare the histograms
    892892//
    893 Bool_t MCT1PadONOFF::PreProcess(MParList *pList)
     893Int_t MCT1PadONOFF::PreProcess(MParList *pList)
    894894{
    895895  if ( !fHSigmaTheta       ||  !fHSigmaThetaON    ||  !fHSigmaThetaOFF    || 
     
    987987// idealy the events to be padded should have been generated without NSB
    988988//
    989 Bool_t MCT1PadONOFF::Process()
     989Int_t MCT1PadONOFF::Process()
    990990{
    991991  //*fLog << "Entry MCT1PadONOFF::Process();" << endl;
     
    16221622//
    16231623//
    1624 Bool_t MCT1PadONOFF::PostProcess()
     1624Int_t MCT1PadONOFF::PostProcess()
    16251625{
    16261626    if (GetNumExecutions() != 0)
  • trunk/MagicSoft/Mars/manalysis/MCT1PadONOFF.h

    r2167 r2206  
    8787    void SetDataType(const char *type);   // type of data to be padded
    8888
    89     Bool_t PreProcess(MParList *pList);
    90     Bool_t Process();
    91     Bool_t PostProcess();
     89    Int_t PreProcess(MParList *pList);
     90    Int_t Process();
     91    Int_t PostProcess();
    9292   
    9393    void SetPadFlag(Int_t padflag);
  • trunk/MagicSoft/Mars/manalysis/MCT1PadSchweizer.cc

    r2175 r2206  
    181181//  Set the pointers and prepare the histograms
    182182//
    183 Bool_t MCT1PadSchweizer::PreProcess(MParList *pList)
     183Int_t MCT1PadSchweizer::PreProcess(MParList *pList)
    184184{
    185185  if ( !fHSigmaTheta  || !fHSigmaPixTheta  || !fHDiffPixTheta  ||
     
    266266// idealy the events to be padded should have been generated without NSB
    267267//
    268 Bool_t MCT1PadSchweizer::Process()
     268Int_t MCT1PadSchweizer::Process()
    269269{
    270270  //*fLog << "Entry MCT1PadSchweizer::Process();" << endl;
     
    731731//
    732732//
    733 Bool_t MCT1PadSchweizer::PostProcess()
     733Int_t MCT1PadSchweizer::PostProcess()
    734734{
    735735    if (GetNumExecutions() != 0)
  • trunk/MagicSoft/Mars/manalysis/MCT1PadSchweizer.h

    r2167 r2206  
    6060                       TH2D *hist2Pix, TH2D *hist2PixN);
    6161
    62     Bool_t PreProcess(MParList *pList);
    63     Bool_t Process();
    64     Bool_t PostProcess();
     62    Int_t PreProcess(MParList *pList);
     63    Int_t Process();
     64    Int_t PostProcess();
    6565   
    6666    void SetPadFlag(Int_t padflag);
  • trunk/MagicSoft/Mars/manalysis/MCT1PointingCorrCalc.cc

    r2173 r2206  
    6060// --------------------------------------------------------------------------
    6161//
    62 Bool_t MCT1PointingCorrCalc::PreProcess(MParList *pList)
     62Int_t MCT1PointingCorrCalc::PreProcess(MParList *pList)
    6363{
    6464    MGeomCam *geom = (MGeomCam*)pList->FindObject("MGeomCam");
     
    7070    }
    7171
    72    fHourAngle = (MParameterD*)pList->FindObject("HourAngle", "MParameterD");
     72    fHourAngle = (MParameterD*)pList->FindObject("HourAngle", "MParameterD");
    7373    if (!fHourAngle)
    7474    {
     
    9595// the parametrization is for Mkn421 2001 data (Daniel Kranich)
    9696//
    97 Bool_t MCT1PointingCorrCalc::Process()
     97Int_t MCT1PointingCorrCalc::Process()
    9898{
    9999   // fhourangle is the hour angle [degrees]
  • trunk/MagicSoft/Mars/manalysis/MCT1PointingCorrCalc.h

    r2088 r2206  
    3232                         const char *name=NULL, const char *title=NULL);
    3333
    34     Bool_t PreProcess(MParList *pList);
    35     Bool_t Process();
     34    Int_t PreProcess(MParList *pList);
     35    Int_t Process();
    3636
    3737    ClassDef(MCT1PointingCorrCalc, 0)   // Task to do the CT1 pointing correction for Mkn421 2001 data
  • trunk/MagicSoft/Mars/manalysis/MCT1SupercutsCalc.cc

    r2173 r2206  
    149149// --------------------------------------------------------------------------
    150150//
    151 Bool_t MCT1SupercutsCalc::PreProcess(MParList *pList)
     151Int_t MCT1SupercutsCalc::PreProcess(MParList *pList)
    152152{
    153153    fHil = (MHillas*)pList->FindObject(fHilName, "MHillas");
     
    235235//                            0.75 otherwise
    236236//
    237 Bool_t MCT1SupercutsCalc::Process()
     237Int_t MCT1SupercutsCalc::Process()
    238238{
    239239    const Double_t kNomLogSize = 4.1;
  • trunk/MagicSoft/Mars/manalysis/MCT1SupercutsCalc.h

    r2038 r2206  
    5050    void InitParams();
    5151
    52     Bool_t PreProcess(MParList *pList);
    53     Bool_t Process();
     52    Int_t PreProcess(MParList *pList);
     53    Int_t Process();
    5454
    5555public:
  • trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc

    r2178 r2206  
    385385}
    386386
    387 Bool_t MCerPhotEvt::GetPixelContent(Float_t &val, Int_t idx, Float_t ratio, Int_t type) const
     387// --------------------------------------------------------------------------
     388//
     389// Returns, depending on the type flag:
     390//
     391//  0: Number of Photons*PixRatio
     392//  1: Error*sqrt(PixRatio)
     393//  2: Cleaning level = Num Photons*sqrt(PixRatio)/Error
     394//  3: Number of Photons
     395//  4: Error
     396//
     397Bool_t MCerPhotEvt::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const
    388398{
    389399    MCerPhotPix *pix = GetPixById(idx);
    390400    if (!pix || !pix->IsPixelUsed())
    391401        return kFALSE;
     402
     403    const Double_t ratio = cam.GetPixRatio(idx);
    392404
    393405    switch (type)
     
    401413        val = pix->GetNumPhotons()*TMath::Sqrt(ratio)/pix->GetErrorPhot();
    402414        return kTRUE;
     415    case 3:
     416        val = pix->GetNumPhotons();
     417        break;
     418    case 4:
     419        val = pix->GetErrorPhot();
     420        break;
    403421    default:
    404422        val = pix->GetNumPhotons()*ratio;
  • trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h

    r2178 r2206  
    6464    void Clear(Option_t *opt=NULL) { Reset(); }
    6565
    66     Bool_t GetPixelContent(Float_t &val, Int_t idx, Float_t ratio=1, Int_t type=0) const;
     66    Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
    6767    void DrawPixelContent(Int_t num) const
    6868    {
  • trunk/MagicSoft/Mars/manalysis/MCompProbCalc.cc

    r2173 r2206  
    8181//  - MHadronness
    8282//
    83 Bool_t MCompProbCalc::PreProcess(MParList *plist)
     83Int_t MCompProbCalc::PreProcess(MParList *plist)
    8484{
    8585    MHCompProb *p = (MHCompProb*)plist->FindObject("MHCompProb");
     
    140140//  - This is the hadroness stored in the MHadronness container
    141141//
    142 Bool_t MCompProbCalc::Process()
     142Int_t MCompProbCalc::Process()
    143143{
    144144    Double_t p = 1;
  • trunk/MagicSoft/Mars/manalysis/MCompProbCalc.h

    r1574 r2206  
    2525    ~MCompProbCalc();
    2626
    27     Bool_t PreProcess(MParList *plist);
    28     Bool_t Process();
     27    Int_t PreProcess(MParList *plist);
     28    Int_t Process();
    2929
    3030    ClassDef(MCompProbCalc, 1) // Task to calculate composite probabilities
  • trunk/MagicSoft/Mars/manalysis/MCurrents.h

    r2183 r2206  
    3737    void Print(Option_t *opt=NULL) const;
    3838
    39     Bool_t GetPixelContent(Float_t &val, Int_t idx, Float_t ratio=1, Int_t type=0) const
     39    Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const
    4040    {
    4141        val = (*this)[idx];
  • trunk/MagicSoft/Mars/manalysis/MEnergyEstParam.cc

    r2179 r2206  
    133133// Check for all necessary parameter containers.
    134134//
    135 Bool_t MEnergyEstParam::PreProcess(MParList *plist)
     135Int_t MEnergyEstParam::PreProcess(MParList *plist)
    136136{
    137137    if (!fMatrix)
     
    299299//  (see code)
    300300//
    301 Bool_t MEnergyEstParam::Process()
     301Int_t MEnergyEstParam::Process()
    302302{
    303303    const Double_t theta  = fMatrix ? GetVal(0) : fMc->GetTelescopeTheta();
  • trunk/MagicSoft/Mars/manalysis/MEnergyEstParam.h

    r2173 r2206  
    4040    Double_t GetVal(Int_t i) const;
    4141
     42    Int_t PreProcess(MParList *plist);
     43    Int_t Process();
    4244
    4345public:
    4446    MEnergyEstParam(const char *hil="MHillas", const char *name=NULL, const char *title=NULL);
    4547    ~MEnergyEstParam();
    46 
    47     Bool_t PreProcess(MParList *plist);
    48     Bool_t Process();
    4948
    5049    void Add(const TString hillas, const TString energy="MEnergyEst");
  • trunk/MagicSoft/Mars/manalysis/MEnergyEstimate.cc

    r2173 r2206  
    6060}
    6161
    62 Bool_t MEnergyEstimate::PreProcess(MParList *plist)
     62Int_t MEnergyEstimate::PreProcess(MParList *plist)
    6363{
    6464   fHillas = (MHillas*)plist->FindObject("MHillas");
     
    8383}
    8484
    85 Bool_t MEnergyEstimate::Process()
     85Int_t MEnergyEstimate::Process()
    8686{
    8787  //fEnergy->SetEnergy(fHillas->GetSize());
  • trunk/MagicSoft/Mars/manalysis/MEnergyEstimate.h

    r1664 r2206  
    2020    MEnergyEstimate(const char *name=NULL, const char *title=NULL);
    2121
    22     Bool_t PreProcess(MParList *plist);
    23     Bool_t Process();
     22    Int_t PreProcess(MParList *plist);
     23    Int_t Process();
    2424
    2525    ClassDef(MEnergyEstimate, 0) // Task to copy the MC energy (preliminary)
  • trunk/MagicSoft/Mars/manalysis/MFiltercutsCalc.cc

    r2173 r2206  
    6262    fList = new MFilterList;
    6363    fList->SetOwner();
     64    fList->SetBit(kMustCleanup);
     65
     66    gROOT->GetListOfCleanups()->Add(fList);
    6467}
    6568
     
    8083{
    8184    f->SetName(f->GetRule());
     85    f->SetBit(kMustCleanup);
    8286    fList->AddToList(f);
    8387}
     
    143147// there. PreProcess the filter list.
    144148//
    145 Bool_t MFiltercutsCalc::PreProcess(MParList *pList)
     149Int_t MFiltercutsCalc::PreProcess(MParList *pList)
    146150{
    147151    if (!fList->PreProcess(pList))
     
    160164// 0.25, otherwise to 0.75.
    161165//
    162 Bool_t MFiltercutsCalc::Process()
     166Int_t MFiltercutsCalc::Process()
    163167{
    164168    if (!fList->Process())
  • trunk/MagicSoft/Mars/manalysis/MFiltercutsCalc.h

    r2124 r2206  
    2424    TString     fHadronnessName;  // name of container to store hadronness
    2525
    26     Bool_t PreProcess(MParList *pList);
    27     Bool_t Process();
     26    Int_t PreProcess(MParList *pList);
     27    Int_t Process();
    2828
    2929    void AddToList(MFilter *f);
  • trunk/MagicSoft/Mars/manalysis/MMatrixLoop.cc

    r1525 r2206  
    5656// been accessed.
    5757//
    58 Bool_t MMatrixLoop::Process()
     58Int_t MMatrixLoop::Process()
    5959{
    6060    return fMatrix->SetNumRow(fNumRow++);
  • trunk/MagicSoft/Mars/manalysis/MMatrixLoop.h

    r1664 r2206  
    2121    MMatrixLoop(MHMatrix *mat, const char *name=NULL, const char *title=NULL);
    2222
    23     Bool_t PreProcess(MParList *plist)
     23    Int_t PreProcess(MParList *plist)
    2424    {
    2525        fNumRow = 0;
     
    2828    }
    2929
    30     Bool_t Process();
     30    Int_t Process();
    3131
    3232    ClassDef(MMatrixLoop, 0) // Task 'reading' events from a MHMatrix
  • trunk/MagicSoft/Mars/manalysis/MMcPedestalCopy.cc

    r2173 r2206  
    9292// If the runtype check fails the task is removed from the task list.
    9393//
    94 Bool_t MMcPedestalCopy::PreProcess(MParList *pList)
     94Int_t MMcPedestalCopy::PreProcess(MParList *pList)
    9595{
    9696    if (!CheckRunType(pList))
  • trunk/MagicSoft/Mars/manalysis/MMcPedestalCopy.h

    r1180 r2206  
    1717    Bool_t CheckRunType(MParList *pList) const;
    1818
     19    Int_t PreProcess(MParList *pList);
     20    Bool_t ReInit(MParList *pList);
     21
    1922public:
    2023    MMcPedestalCopy(const char *name=NULL, const char *title=NULL);
    21 
    22     Bool_t PreProcess(MParList *pList);
    23 
    24     virtual Bool_t ReInit(MParList *pList);
    2524
    2625    ClassDef(MMcPedestalCopy, 0)   // Task which copies the pedestals from the MC into the standard container
  • trunk/MagicSoft/Mars/manalysis/MMcPedestalNSBAdd.cc

    r2178 r2206  
    116116// - try to find a MMcRunHeader, too
    117117//
    118 Bool_t MMcPedestalNSBAdd::PreProcess(MParList *pList)
     118Int_t MMcPedestalNSBAdd::PreProcess(MParList *pList)
    119119{
    120120    if (!CheckRunType(pList))
  • trunk/MagicSoft/Mars/manalysis/MMcPedestalNSBAdd.h

    r1180 r2206  
    2121    Bool_t CheckRunType(MParList *pList) const;
    2222    Float_t GetDnsb(MParList *pList) const;
     23    Int_t PreProcess(MParList *pList);
     24    Bool_t ReInit(MParList *pList);
     25
    2326
    2427public:
     
    2629                      const char *name=NULL, const char *title=NULL);
    2730
    28     Bool_t PreProcess(MParList *pList);
    29 
    30     virtual Bool_t ReInit(MParList *pList);
    31 
    3231    ClassDef(MMcPedestalNSBAdd, 0)   // Task which adds the NSB fluctuations to the pedestals rms
    3332};
  • trunk/MagicSoft/Mars/manalysis/MMcTriggerLvl2Calc.cc

    r2173 r2206  
    7171//
    7272//
    73 Bool_t MMcTriggerLvl2Calc::PreProcess (MParList *pList)
     73Int_t MMcTriggerLvl2Calc::PreProcess (MParList *pList)
    7474{
    7575    // connect the raw data with this task
     
    130130//
    131131//
    132 Bool_t MMcTriggerLvl2Calc::Process()
     132Int_t MMcTriggerLvl2Calc::Process()
    133133{
    134134  //const Float_t energy = fMcEvt->GetEnergy();
     
    153153//           !to be fixed: create an histogram class!
    154154//
    155 Bool_t MMcTriggerLvl2Calc::PostProcess()
     155Int_t MMcTriggerLvl2Calc::PostProcess()
    156156{
    157157 
  • trunk/MagicSoft/Mars/manalysis/MMcTriggerLvl2Calc.h

    r2006 r2206  
    2828  MHMcTriggerLvl2 *fMHMcTriggerLvl2;
    2929
     30  Int_t PreProcess(MParList *pList);
     31  Int_t Process();
     32  Int_t PostProcess();
     33
    3034 public:
    3135    MMcTriggerLvl2Calc(const char *name=NULL, const char *title=NULL);   
    32 
    33     Bool_t PreProcess(MParList *pList);
    34     Bool_t Process();
    35     Bool_t PostProcess();
    3636
    3737    ClassDef(MMcTriggerLvl2Calc, 0) // Task to calculate the MMcTriggerLvl2 Parameters
  • trunk/MagicSoft/Mars/manalysis/MMultiDimDistCalc.cc

    r2173 r2206  
    105105// number of columns (with the same meaning).
    106106//
    107 Bool_t MMultiDimDistCalc::PreProcess(MParList *plist)
     107Int_t MMultiDimDistCalc::PreProcess(MParList *plist)
    108108{
    109109    fMGammas = (MHMatrix*)plist->FindObject("MatrixGammas", "MHMatrix");
     
    172172//  H = exp(-dh/dg);
    173173//
    174 Bool_t MMultiDimDistCalc::Process()
     174Int_t MMultiDimDistCalc::Process()
    175175{
    176176    // first copy the data from the data array to a vector event
  • trunk/MagicSoft/Mars/manalysis/MMultiDimDistCalc.h

    r1917 r2206  
    2727
    2828    void StreamPrimitive(ofstream &out) const;
     29    Int_t PreProcess(MParList *plist);
     30    Int_t Process();
    2931
    3032public:
     
    3840    void SetUseKernelMethod(Bool_t k=kTRUE) { fUseKernel = k; }
    3941
    40     Bool_t PreProcess(MParList *plist);
    41     Bool_t Process();
    42 
    4342    ClassDef(MMultiDimDistCalc, 1) // Task to calculate nearest neighbor-/kernel-hadronness
    4443};
  • trunk/MagicSoft/Mars/manalysis/MPadding.cc

    r2173 r2206  
    230230//  if not create one and add them to the list
    231231//
    232 Bool_t MPadding::PreProcess(MParList *pList)
     232Int_t MPadding::PreProcess(MParList *pList)
    233233{
    234234  fMcEvt = (MMcEvt*)pList->FindObject("MMcEvt");
     
    407407// Do the padding  (mySig ==> otherSig)
    408408//
    409 Bool_t MPadding::Padding(const Double_t quadraticDiff, const Double_t theta)
     409Int_t MPadding::Padding(const Double_t quadraticDiff, const Double_t theta)
    410410{
    411411   const UInt_t npix = fEvt->GetNumPixels();
     
    469469// 3) pad event
    470470//
    471 Bool_t MPadding::Process()
     471Int_t MPadding::Process()
    472472{
    473473    const Double_t theta = kRad2Deg*fMcEvt->GetTelescopeTheta();
  • trunk/MagicSoft/Mars/manalysis/MPadding.h

    r2062 r2206  
    4343    Bool_t   Padding(const Double_t quadDiff, const Double_t theta);
    4444
     45    Int_t PreProcess(MParList *pList);
     46    Int_t Process();
     47    Int_t PostProcess();
     48
    4549public:
    4650    MPadding(const char *name=NULL, const char *title=NULL);
    4751    ~MPadding();
    4852
    49     Bool_t PreProcess(MParList *pList);
    50     Bool_t Process();
    51     Bool_t PostProcess();
    52    
    5353    void SetRunType(Int_t runtype) { fRunType =  runtype; }
    5454    void SetGroup(Int_t group)     { fGroup   =  group; }
  • trunk/MagicSoft/Mars/manalysis/MPedCalcPedRun.cc

    r2173 r2206  
    6464}
    6565
    66 Bool_t MPedCalcPedRun::PreProcess( MParList *pList )
     66Int_t MPedCalcPedRun::PreProcess( MParList *pList )
    6767{
    6868    fRawEvt = (MRawEvtData*)pList->FindObject("MRawEvtData");
     
    8383
    8484
    85 Bool_t MPedCalcPedRun::Process()
     85Int_t MPedCalcPedRun::Process()
    8686{
    8787    MRawEvtPixelIter pixel(fRawEvt);
  • trunk/MagicSoft/Mars/manalysis/MPedCalcPedRun.h

    r1014 r2206  
    2929    Float_t CalcHiGainRmsErr(Float_t higainrms) const;
    3030
     31    Int_t PreProcess(MParList *pList);
     32    Int_t Process();
     33
    3134public:
    3235
    3336    MPedCalcPedRun(const char *name=NULL, const char *title=NULL);
    34 
    35     Bool_t PreProcess(MParList *pList);
    36     Bool_t Process();
    3737
    3838    ClassDef(MPedCalcPedRun, 0)   // Task to calculate pedestals from pedestal runs raw data
  • trunk/MagicSoft/Mars/manalysis/MPedestalCalc.cc

    r1629 r2206  
    7272}
    7373
    74 Bool_t MPedestalCalc::PreProcess(MParList *pList)
     74Int_t MPedestalCalc::PreProcess(MParList *pList)
    7575{
    7676    if (fHists)
     
    123123//  Then the current event is filled into the histograms.
    124124//
    125 Bool_t MPedestalCalc::Process()
     125Int_t MPedestalCalc::Process()
    126126{
    127127    //
  • trunk/MagicSoft/Mars/manalysis/MPedestalCalc.h

    r1630 r2206  
    4141    void Check(Int_t i);
    4242
    43     Bool_t PreProcess(MParList *pList);
    44     Bool_t Process();
    45     Bool_t PostProcess();
     43    Int_t PreProcess(MParList *pList);
     44    Int_t Process();
     45    Int_t PostProcess();
    4646
    4747public:
  • trunk/MagicSoft/Mars/manalysis/MPedestalCam.cc

    r2180 r2206  
    182182}
    183183
    184 Bool_t MPedestalCam::GetPixelContent(Float_t &val, Int_t idx, Float_t ratio, Int_t type) const
     184Bool_t MPedestalCam::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const
    185185{
    186     val = (*this)[idx].GetMean()*ratio;
     186    val = (*this)[idx].GetMean()*cam.GetPixRatio(idx);
    187187    return kTRUE;
    188188}
  • trunk/MagicSoft/Mars/manalysis/MPedestalCam.h

    r2178 r2206  
    3535    void Print(Option_t *o="") const;
    3636
    37     Bool_t GetPixelContent(Float_t &val, Int_t idx, Float_t ratio=1, Int_t type=0) const;
     37    Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
    3838    void DrawPixelContent(Int_t num) const
    3939    {
  • trunk/MagicSoft/Mars/manalysis/MPointingCorr.cc

    r1888 r2206  
    6464//
    6565//
    66 Bool_t MPointingCorr::PreProcess(MParList *pList)
     66Int_t MPointingCorr::PreProcess(MParList *pList)
    6767{
    6868    MGeomCam *geom = (MGeomCam*)pList->FindObject("MGeomCam");
     
    107107// the parametrization is for Mkn421 2001 data (Daniel Kranich)
    108108//
    109 Bool_t MPointingCorr::Process()
     109Int_t MPointingCorr::Process()
    110110{
    111111   // fhourangle is the hour angle [degrees]
     
    133133   return kTRUE;
    134134}
    135 // --------------------------------------------------------------------------
    136 //
    137 // 
    138 //
    139 Bool_t MPointingCorr::PostProcess()
    140 {
    141     return kTRUE;
    142 }
    143 //============================================================================
    144 
    145 
    146 
    147 
    148 
    149 
  • trunk/MagicSoft/Mars/manalysis/MPointingCorr.h

    r1951 r2206  
    2828    Float_t       fMm2Deg;
    2929
     30    Int_t PreProcess(MParList *pList);
     31    Int_t Process();
     32
    3033public:
    3134    MPointingCorr(const char *name=NULL, const char *title=NULL,
    3235                  const char *srcname="MSrcPosCam");
    33 
    34     Bool_t PreProcess(MParList *pList);
    35     Bool_t Process();
    36     Bool_t PostProcess();
    3736
    3837    ClassDef(MPointingCorr, 0)   // Task to do the pointing correction
     
    4039
    4140#endif
    42 
    43 
    44 
    45 
    46 
    47 
    48 
    49 
    50 
    51 
    52 
  • trunk/MagicSoft/Mars/mbase/MClone.cc

    r2173 r2206  
    112112//  the name of it was given in the constructor.
    113113//
    114 Bool_t MClone::PreProcess(MParList *pList)
     114Int_t MClone::PreProcess(MParList *pList)
    115115{
    116116    //
     
    158158//  again.
    159159//
    160 Bool_t MClone::Process()
     160Int_t MClone::Process()
    161161{
    162162    //
  • trunk/MagicSoft/Mars/mbase/MClone.h

    r1540 r2206  
    2727    ~MClone();
    2828
    29     Bool_t PreProcess(MParList *pList);
    30     Bool_t Process();
     29    Int_t PreProcess(MParList *pList);
     30    Int_t Process();
    3131
    3232    TObject *GetClone() const  { return fClone; }
  • trunk/MagicSoft/Mars/mbase/MContinue.cc

    r2173 r2206  
    112112//  before this instance to the tasklist and preprocesses the filter.
    113113//
    114 Bool_t MContinue::PreProcess(MParList *list)
     114Int_t MContinue::PreProcess(MParList *list)
    115115{
    116116    if (!GetFilter())
     
    147147}
    148148
     149void MContinue::SetDisplay(MStatusDisplay *d)
     150{
     151    if (GetFilter())
     152        GetFilter()->SetDisplay(d);
     153
     154    MTask::SetDisplay(d);
     155}
     156
     157void MContinue::SetLogStream(MLog *lg)
     158{
     159    if (GetFilter())
     160        GetFilter()->SetLogStream(lg);
     161
     162    MTask::SetLogStream(lg);
     163}
     164
    149165// --------------------------------------------------------------------------
    150166//
     
    152168// from the tasklist.
    153169//
    154 Bool_t MContinue::PostProcess()
     170Int_t MContinue::PostProcess()
    155171{
    156172    if (!TestBit(kFilterIsPrivate))
  • trunk/MagicSoft/Mars/mbase/MContinue.h

    r1938 r2206  
    1515#endif
    1616
     17class MLog;
    1718class MFilter;
    1819class MTaskList;
     20class MStatusDisplay;
    1921
    2022class MContinue : public MTask
     
    2325    MTaskList *fTaskList;  //! pointer to the present tasklist
    2426
    25     Bool_t PreProcess(MParList *list);
    26     Bool_t Process() { return kCONTINUE; }
    27     Bool_t PostProcess();
     27    Int_t PreProcess(MParList *list);
     28    Int_t Process() { return kCONTINUE; }
     29    Int_t PostProcess();
    2830
    2931    enum { kIsOwner = BIT(14), kFilterIsPrivate = BIT(15) };
     
    3739    Bool_t IsInverted() const;
    3840
     41    void SetDisplay(MStatusDisplay *d);
     42    void SetLogStream(MLog *lg);
     43
    3944    ClassDef(MContinue, 1) //Task returning kCONTINUE
    4045};
  • trunk/MagicSoft/Mars/mbase/MEvtLoop.cc

    r2173 r2206  
    109109    fName = name;
    110110
     111    gROOT->GetListOfCleanups()->Add(this); // To remove fDisplay
     112
    111113    *fLog << inf << underline << "Instantiated MEvtLoop (" << name << "), using ROOT v" << ROOTVER << endl;
    112114}
     
    122124}
    123125
     126void MEvtLoop::SetParList(MParList *p)
     127{
     128    if (!p)
     129        return;
     130
     131    p->SetBit(kMustCleanup);
     132    fParList = p;
     133}
     134
    124135// --------------------------------------------------------------------------
    125136//
     
    152163}
    153164
     165void MEvtLoop::SetProgressBar(TGProgressBar *bar)
     166{
     167    fProgress = bar;
     168    fProgress->SetBit(kMustCleanup);
     169}
     170
    154171#ifdef __MARS__
    155172// --------------------------------------------------------------------------
     
    160177void MEvtLoop::SetProgressBar(MProgressBar *bar)
    161178{
    162     fProgress = bar->GetBar();
     179    SetProgressBar(bar->GetBar());
    163180}
    164181#endif
     
    200217    // Check whether display is still existing
    201218    //
    202     if (fDisplay && !gROOT->GetListOfSpecials()->FindObject(fDisplay))
    203         fDisplay = NULL;
    204219    if (fDisplay)
    205220    {
     
    238253Bool_t MEvtLoop::ProcessGuiEvents(Int_t num)
    239254{
    240     if (!fProgress)
     255    if (!fProgress || gROOT->IsBatch())
    241256        return kTRUE;
    242257
     
    255270            fDisplay->ClearStatus();
    256271            break;
    257         case MStatusDisplay::kFileExit:
    258             fParList->SetDisplay(NULL);
    259             delete fDisplay;
    260             SetDisplay(NULL);
    261             fProgress = NULL;
    262             gSystem->ProcessEvents();
    263             return kTRUE;
    264272        default:
    265273            *fLog << warn << "MEvtloop: fDisplay->ChecStatus() has returned unknown status #" << fDisplay->CheckStatus() << "... cleared." << endl;
     
    348356    Int_t entries = INT_MAX;
    349357
    350     if (fProgress)
     358    if (fProgress && !gROOT->IsBatch())
    351359    {
    352360        fProgress->Reset();
     
    409417    clock.Stop();
    410418
    411     if (fProgress)
     419    if (fProgress && !gROOT->IsBatch())
    412420    {
    413421        fProgress->SetPosition(maxcnt>0 ? TMath::Min(maxcnt, entries) : entries);
     
    912920    return kTRUE;
    913921}
     922
     923void MEvtLoop::RecursiveRemove(TObject *obj)
     924{
     925    if (obj==fParList)
     926    {
     927        fParList=NULL;
     928        fTaskList=NULL;
     929    }
     930
     931    if (obj==fProgress)
     932        fProgress = NULL;
     933
     934    if (obj==fDisplay)
     935    {
     936        if (fParList)
     937            fParList->SetDisplay(NULL);
     938        SetDisplay(NULL);
     939        fProgress = NULL;
     940    }
     941
     942    if (obj==fLog)
     943    {
     944        if (fParList)
     945            fParList->SetLogStream(NULL);
     946        SetLogStream(NULL);
     947    }
     948}
  • trunk/MagicSoft/Mars/mbase/MEvtLoop.h

    r2098 r2206  
    2828    MTaskList *fTaskList;      //!
    2929
    30     TGProgressBar   *fProgress;  //!
     30    TGProgressBar *fProgress;  //!
    3131
    3232    enum { kIsOwner = BIT(14) };
     
    4343    virtual ~MEvtLoop();
    4444
    45     void       SetParList(MParList *p)  { fParList = p; }
    46     MParList  *GetParList() const       { return fParList; }
    47     MTaskList *GetTaskList() const      { return fTaskList; }
     45    void       SetParList(MParList *p);
     46    MParList  *GetParList() const  { return fParList; }
     47    MTaskList *GetTaskList() const { return fTaskList; }
    4848
    4949    MTask *FindTask(const char *name) const;
     
    5454    void SetOwner(Bool_t enable=kTRUE);
    5555
    56     void SetProgressBar(TGProgressBar *bar) { fProgress = bar; }
     56    void SetProgressBar(TGProgressBar *bar);
    5757#ifdef __MARS__
    5858    void SetProgressBar(MProgressBar *bar);
     
    7777    Bool_t WriteEnv(TEnv &env, TString prefix="", Bool_t print=kFALSE) const;
    7878
     79    void RecursiveRemove(TObject *obj);
     80
    7981    ClassDef(MEvtLoop, 1) // Class to execute the tasks in a tasklist
    8082};
    8183
     84// FIXME: Move as (persistent) static data member to MParContainer
    8285R__EXTERN TList *gListOfPrimitives; // instantiation in MEvtLoop
    8386
  • trunk/MagicSoft/Mars/mbase/MGTask.cc

    r2173 r2206  
    7070//  MTask::CallPreProcess
    7171//
    72 Bool_t MGTask::CallPreProcess(MParList *plist)
     72Int_t MGTask::CallPreProcess(MParList *plist)
    7373{
    7474    HideGui();
     
    8282//  MTask::CallPostProcess
    8383//
    84 Bool_t MGTask::CallPostProcess()
     84Int_t MGTask::CallPostProcess()
    8585{
    8686    ShowGui();
  • trunk/MagicSoft/Mars/mbase/MGTask.h

    r1664 r2206  
    3838    virtual ~MGTask();
    3939
    40     Bool_t CallPreProcess(MParList *plist);
    41     Bool_t CallPostProcess();
     40    Int_t CallPreProcess(MParList *plist);
     41    Int_t CallPostProcess();
    4242
    4343    virtual Bool_t ProcessMessage(Int_t msg, Int_t submsg, Long_t param1, Long_t param2);
  • trunk/MagicSoft/Mars/mbase/MPrint.cc

    r2173 r2206  
    107107//  the name of it was given in the constructor.
    108108//
    109 Bool_t MPrint::PreProcess(MParList *pList)
     109Int_t MPrint::PreProcess(MParList *pList)
    110110{
    111111    //
     
    142142//  Calls overloaded TObject::Print
    143143//
    144 Bool_t MPrint::Process()
     144Int_t MPrint::Process()
    145145{
    146146    fObject->Print(fOption);
  • trunk/MagicSoft/Mars/mbase/MPrint.h

    r1542 r2206  
    2626    void EnableSkip(Bool_t skip=kTRUE) { skip ? SetBit(kSkip) : ResetBit(kSkip); }
    2727
    28     Bool_t PreProcess(MParList *pList);
    29     Bool_t Process();
     28    Int_t PreProcess(MParList *pList);
     29    Int_t Process();
    3030
    3131    ClassDef(MPrint, 0) // Task to call Print() function
  • trunk/MagicSoft/Mars/mbase/MTask.cc

    r2173 r2206  
    165165// Sets the preprocessed flag dependend on the return value of PreProcess.
    166166//
    167 Bool_t MTask::CallPreProcess(MParList *plist)
     167Int_t MTask::CallPreProcess(MParList *plist)
    168168{
    169169    fNumExecutions = 0;
     
    199199// If Process is executed, the execution counter is increased.
    200200//
    201 Bool_t MTask::CallProcess()
     201Int_t MTask::CallProcess()
    202202{
    203203    //
     
    221221// resets this flag.
    222222//
    223 Bool_t MTask::CallPostProcess()
     223Int_t MTask::CallPostProcess()
    224224{
    225225    if (!fIsPreprocessed)
     
    261261// the virtual implementation returns kTRUE
    262262//
    263 Bool_t MTask::PreProcess(MParList *pList)
     263Int_t MTask::PreProcess(MParList *pList)
    264264{
    265265    return kTRUE;
     
    272272// the virtual implementation returns kTRUE
    273273//
    274 Bool_t MTask::Process()
     274Int_t MTask::Process()
    275275{
    276276    return kTRUE;
     
    283283// the virtual implementation returns kTRUE
    284284//
    285 Bool_t MTask::PostProcess()
     285Int_t MTask::PostProcess()
    286286{
    287287    return kTRUE;
  • trunk/MagicSoft/Mars/mbase/MTask.h

    r2117 r2206  
    2929    UInt_t fNumExecutions;  //! Number of Excutions
    3030
    31     virtual Bool_t PreProcess(MParList *pList);
    32     virtual Bool_t Process();
    33     virtual Bool_t PostProcess();
     31    virtual Int_t PreProcess(MParList *pList);
     32    virtual Int_t Process();
     33    virtual Int_t PostProcess();
    3434
    3535protected:
     
    7575    virtual Bool_t ReInit(MParList *pList);
    7676
    77     virtual Bool_t CallPreProcess(MParList *plist);
    78     virtual Bool_t CallProcess();
    79     virtual Bool_t CallPostProcess();
     77    virtual Int_t CallPreProcess(MParList *plist);
     78    virtual Int_t CallProcess();
     79    virtual Int_t CallPostProcess();
    8080
    8181    const TList *GetListOfBranches() const { return fListOfBranches; }
  • trunk/MagicSoft/Mars/mbase/MTaskInteractive.cc

    r2178 r2206  
    7575}
    7676
    77 inline Bool_t MTaskInteractive::Return(Int_t no, void *params)
     77inline Int_t MTaskInteractive::Return(Int_t no, void *params)
    7878{
    7979    // Static function called when SetFCN is called in interactive mode
  • trunk/MagicSoft/Mars/mbase/MTaskInteractive.h

    r2156 r2206  
    2323    TMethodCall *fCall[3];
    2424
    25     Bool_t (*fPreProcess)(MParList *list);
    26     Bool_t (*fProcess)();
    27     Bool_t (*fPostProcess)();
     25    Int_t (*fPreProcess)(MParList *list);
     26    Int_t (*fProcess)();
     27    Int_t (*fPostProcess)();
    2828
    29     Bool_t PreProcess(MParList *list) { if (fCall[0]) return Return(0, &list); return fPreProcess  ? (*fPreProcess)(list) : kTRUE; }
    30     Bool_t Process()                  { if (fCall[1]) return Return(1);        return fProcess     ? (*fProcess)()        : kTRUE; }
    31     Bool_t PostProcess()              { if (fCall[2]) return Return(2);        return fPostProcess ? (*fPostProcess)()    : kTRUE; }
     29    Int_t PreProcess(MParList *list) { if (fCall[0]) return Return(0, &list); return fPreProcess  ? (*fPreProcess)(list) : kTRUE; }
     30    Int_t Process()                  { if (fCall[1]) return Return(1);        return fProcess     ? (*fProcess)()        : kTRUE; }
     31    Int_t PostProcess()              { if (fCall[2]) return Return(2);        return fPostProcess ? (*fPostProcess)()    : kTRUE; }
    3232
    33     Bool_t Return(Int_t no, void *param=NULL);
     33    Int_t Return(Int_t no, void *param=NULL);
    3434    Bool_t Set(void *fcn, Int_t no, const char *params);
    3535    void   Free(Int_t no);
     
    4040
    4141    // This is to be used in compiled code
    42     void SetPreProcess(Bool_t (*func)(MParList *list)) { fPreProcess = func;  Free(0); }
    43     void SetProcess(Bool_t (*func)())                  { fProcess = func;     Free(1);  }
    44     void SetPostProcess(Bool_t (*func)())              { fPostProcess = func; Free(2);  }
     42    void SetPreProcess(Int_t (*func)(MParList *list)) { fPreProcess = func;  Free(0); }
     43    void SetProcess(Int_t (*func)())                  { fProcess = func;     Free(1);  }
     44    void SetPostProcess(Int_t (*func)())              { fPostProcess = func; Free(2);  }
    4545
    4646    // This is for usage in CINT
  • trunk/MagicSoft/Mars/mbase/MTaskList.cc

    r2178 r2206  
    9292
    9393    fTasks = new TList;
     94
     95    gROOT->GetListOfCleanups()->Add(fTasks);
     96    gROOT->GetListOfCleanups()->Add(&fTasksProcess);
     97    fTasks->SetBit(kMustCleanup);
     98    fTasksProcess.SetBit(kMustCleanup);
    9499}
    95100
     
    212217    *fLog << inf << "Adding " << task->GetName() << " to " << GetName() << " for " << type << "... " << flush;
    213218    task->SetStreamId(type);
     219    task->SetBit(kMustCleanup);
    214220    fTasks->AddBefore((TObject*)where, task);
    215221    *fLog << "Done." << endl;
     
    232238    *fLog << inf << "Adding " << task->GetName() << " to " << GetName() << " for " << type << "... " << flush;
    233239    task->SetStreamId(type);
     240    task->SetBit(kMustCleanup);
    234241    fTasks->AddAfter((TObject*)where, task);
    235242    *fLog << "Done." << endl;
     
    252259    *fLog << inf << "Adding " << task->GetName() << " to " << GetName() << " for " << type << "... " << flush;
    253260    task->SetStreamId(type);
     261    task->SetBit(kMustCleanup);
    254262    fTasks->Add(task);
    255263    *fLog << "Done." << endl;
     
    331339//  doing no Processing are not Processed.
    332340//
    333 Bool_t MTaskList::PreProcess(MParList *pList)
     341Int_t MTaskList::PreProcess(MParList *pList)
    334342{
    335343    *fLog << all << "Preprocessing... " << flush;
     
    399407// do the event execution of all tasks in the task-list
    400408//
    401 Bool_t MTaskList::Process()
     409Int_t MTaskList::Process()
    402410{
    403411    //
     
    501509//  only tasks which have successfully been preprocessed are postprocessed.
    502510//
    503 Bool_t MTaskList::PostProcess()
     511Int_t MTaskList::PostProcess()
    504512{
    505513    *fLog << all << "Postprocessing... " << flush;
  • trunk/MagicSoft/Mars/mbase/MTaskList.h

    r2098 r2206  
    6363    Bool_t ReInit(MParList *pList=NULL);
    6464
    65     Bool_t PreProcess(MParList *pList);
    66     Bool_t Process();
    67     Bool_t PostProcess();
     65    Int_t PreProcess(MParList *pList);
     66    Int_t Process();
     67    Int_t PostProcess();
    6868
    6969    void Print(Option_t *opt = "") const;
  • trunk/MagicSoft/Mars/mdata/MDataArray.cc

    r2173 r2206  
    5757    fName  = name  ? name  : gsDefName.Data();
    5858    fTitle = title ? title : gsDefTitle.Data();
     59
     60    gROOT->GetListOfCleanups()->Add(&fList);
     61    fList.SetBit(kMustCleanup);
    5962}
    6063
     
    7780void MDataArray::AddEntry(MData *data)
    7881{
     82    data->SetBit(kMustCleanup);
    7983    fList.Add(data);
    8084}
  • trunk/MagicSoft/Mars/mdata/MDataList.cc

    r2173 r2206  
    4545{
    4646    fSign = kENone;
     47
     48    gROOT->GetListOfCleanups()->Add(&fMembers);
     49    fMembers.SetBit(kMustCleanup);
    4750}
    4851
     
    7679        fSign = kENone;
    7780    }
     81
     82    gROOT->GetListOfCleanups()->Add(&fMembers);
     83    fMembers.SetBit(kMustCleanup);
    7884}
    7985
     
    179185    }
    180186
     187    member->SetBit(kMustCleanup);
    181188    fMembers.Add(member);
    182189
  • trunk/MagicSoft/Mars/mdatacheck/DataCheckLinkDef.h

    r1018 r2206  
    55#pragma link off all functions;
    66
    7 #pragma link C++ class MDumpEvtHeader+;
    8 
    97#endif
  • trunk/MagicSoft/Mars/mdatacheck/MDumpEvtHeader.cc

    r2173 r2206  
    6060// data.
    6161//
    62 Bool_t MDumpEvtHeader::PreProcess (MParList *pList)
     62Int_t MDumpEvtHeader::PreProcess (MParList *pList)
    6363{
    6464    fRawEvtHeader = (MRawEvtHeader*)pList->FindObject("MRawEvtHeader");
     
    8484// pixel ID's of all pixels in this event.
    8585//
    86 Bool_t MDumpEvtHeader::Process()
     86Int_t MDumpEvtHeader::Process()
    8787{
    8888    fRawEvtHeader->Print();
  • trunk/MagicSoft/Mars/mdatacheck/MDumpEvtHeader.h

    r1013 r2206  
    1616    MRawEvtData   *fRawEvtData;
    1717
     18    Int_t PreProcess(MParList *pList);
     19    Int_t Process();
     20
    1821public:
    1922  MDumpEvtHeader () : fRawEvtHeader(NULL) { };
    2023
    21   Bool_t PreProcess(MParList *pList);
    22   Bool_t Process();
    23  
    2424  ClassDef(MDumpEvtHeader, 0)   // Class to dump the pixel ids of a raw evt to the screen
    2525
  • trunk/MagicSoft/Mars/mdatacheck/Makefile

    r1052 r2206  
    2828.SUFFIXES: .c .cc .cxx .h .hxx .o
    2929
    30 SRCFILES = MDumpEvtHeader.cc \
    31            MGDisplayAdc.cc
     30SRCFILES = MGDisplayAdc.cc
    3231
    3332SRCS    = $(SRCFILES)
  • trunk/MagicSoft/Mars/mfileio/MCT1ReadAscii.cc

    r2173 r2206  
    156156// Initialize the size of the MPedestalCam container to 127 pixels (CT1 camera)
    157157//
    158 Bool_t MCT1ReadAscii::PreProcess(MParList *pList)
     158Int_t MCT1ReadAscii::PreProcess(MParList *pList)
    159159{
    160160    //
     
    264264// there is now next file stop the eventloop.
    265265//
    266 Bool_t MCT1ReadAscii::Process()
     266Int_t MCT1ReadAscii::Process()
    267267{
    268268    //
  • trunk/MagicSoft/Mars/mfileio/MCT1ReadAscii.h

    r1880 r2206  
    2323    void ReadData();
    2424
     25    Int_t PreProcess(MParList *pList);
     26    Int_t Process();
     27
    2528public:
    2629    MCT1ReadAscii(const char *filename=NULL,
     
    3235    Int_t AddFile(const char *fname, Int_t dummy=-1);
    3336
    34     Bool_t PreProcess(MParList *pList);
    35     Bool_t Process();
    36 
    3737    ClassDef(MCT1ReadAscii, 0)  // Reads the CT1 data file
    3838};
  • trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc

    r2173 r2206  
    730730// Initialize the size of the MPedestalCam container to 127 pixels (CT1 camera)
    731731//
    732 Bool_t MCT1ReadPreProc::PreProcess(MParList *pList)
     732Int_t MCT1ReadPreProc::PreProcess(MParList *pList)
    733733{
    734734    fParList = pList;
     
    10911091// there is now next file stop the eventloop.
    10921092//
    1093 Bool_t MCT1ReadPreProc::Process()
     1093Int_t MCT1ReadPreProc::Process()
    10941094{
    10951095    //
     
    11521152}
    11531153
    1154 Bool_t MCT1ReadPreProc::PostProcess()
     1154Int_t MCT1ReadPreProc::PostProcess()
    11551155{
    11561156    *fLog << all;
  • trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.h

    r2152 r2206  
    7979    Double_t DiscreteTheta(Double_t theta);
    8080
    81     Bool_t PreProcess(MParList *pList);
    82     Bool_t Process();
    83     Bool_t PostProcess();
     81    Int_t PreProcess(MParList *pList);
     82    Int_t Process();
     83    Int_t PostProcess();
    8484
    8585    Bool_t Rewind();
  • trunk/MagicSoft/Mars/mfileio/MReadCurrents.cc

    r2173 r2206  
    151151// Initialize the size of the MPedestalCam container to 127 pixels (CT1 camera)
    152152//
    153 Bool_t MReadCurrents::PreProcess(MParList *pList)
     153Int_t MReadCurrents::PreProcess(MParList *pList)
    154154{
    155155    //
     
    190190// there is now next file stop the eventloop.
    191191//
    192 Bool_t MReadCurrents::Process()
     192Int_t MReadCurrents::Process()
    193193{
    194194    //
  • trunk/MagicSoft/Mars/mfileio/MReadCurrents.h

    r2148 r2206  
    2929    Int_t AddFile(const char *fname, Int_t dummy=-1);
    3030
    31     Bool_t PreProcess(MParList *pList);
    32     Bool_t Process();
     31    Int_t PreProcess(MParList *pList);
     32    Int_t Process();
    3333
    3434    ClassDef(MReadCurrents, 0)  // Reads a Central Control currents file
  • trunk/MagicSoft/Mars/mfileio/MReadMarsFile.cc

    r2173 r2206  
    199199//  see MReadTree::PreProcess for more information
    200200//
    201 Bool_t MReadMarsFile::PreProcess(MParList *pList)
     201Int_t MReadMarsFile::PreProcess(MParList *pList)
    202202{
    203203    fParList = pList;
  • trunk/MagicSoft/Mars/mfileio/MReadMarsFile.h

    r2117 r2206  
    1717    Bool_t Notify();
    1818
    19     Bool_t PreProcess(MParList *pList);
     19    Int_t PreProcess(MParList *pList);
    2020 
    2121public:
  • trunk/MagicSoft/Mars/mfileio/MReadRflFile.cc

    r2173 r2206  
    4242#include "MRflEvtHeader.h"
    4343#include "MRflRunHeader.h"
     44#include "MRflSinglePhoton.h"
    4445
    4546#include "MLog.h"
     
    219220}
    220221
    221 Bool_t MReadRflFile::Process()
     222Int_t MReadRflFile::Process()
    222223{
    223224    for (;;)
     
    248249}
    249250
    250 Bool_t MReadRflFile::PreProcess(MParList *plist)
     251Int_t MReadRflFile::PreProcess(MParList *plist)
    251252{
    252253    fEvtData=(MRflEvtData*)plist->FindCreateObj("MRflEvtData");
  • trunk/MagicSoft/Mars/mfileio/MReadRflFile.h

    r2136 r2206  
    3838    Bool_t OpenNextFile();
    3939
    40     Bool_t PreProcess(MParList *pList);
    41     Bool_t Process();
     40    Int_t PreProcess(MParList *pList);
     41    Int_t Process();
    4242
    4343public:
  • trunk/MagicSoft/Mars/mfileio/MReadTree.cc

    r2173 r2206  
    572572//  MReadTree::PreProcess
    573573//
    574 Bool_t MReadTree::PreProcess(MParList *pList)
     574Int_t MReadTree::PreProcess(MParList *pList)
    575575{
    576576    //
     
    755755#include "MRawEvtData.h"
    756756#endif
    757 Bool_t MReadTree::Process()
     757Int_t MReadTree::Process()
    758758{
    759759    //
     
    816816//  If a selector is given the selector is post processed
    817817//
    818 Bool_t MReadTree::PostProcess()
     818Int_t MReadTree::PostProcess()
    819819{
    820820    return GetSelector() ? GetSelector()->CallPostProcess() : kTRUE;
  • trunk/MagicSoft/Mars/mfileio/MReadTree.h

    r2123 r2206  
    6868    virtual Int_t AddFiles(const MReadTree &read);
    6969
    70     Bool_t PreProcess(MParList *pList);
    71     Bool_t Process();
    72     Bool_t PostProcess();
     70    Int_t PreProcess(MParList *pList);
     71    Int_t Process();
     72    Int_t PostProcess();
    7373
    7474    Bool_t Notify();
  • trunk/MagicSoft/Mars/mfileio/MWriteFile.cc

    r2173 r2206  
    5757// to the output file.
    5858//
    59 Bool_t MWriteFile::PreProcess(MParList *pList)
     59Int_t MWriteFile::PreProcess(MParList *pList)
    6060{
    6161    //
     
    8989// the container should be written to the output.
    9090//
    91 Bool_t MWriteFile::Process()
     91Int_t MWriteFile::Process()
    9292{
    9393    CheckAndWrite();
    94 
    9594    return kTRUE;
    9695}
     
    101100// the container should be written to the output.
    102101//
    103 Bool_t MWriteFile::PostProcess()
     102Int_t MWriteFile::PostProcess()
    104103{
    105104    //
     
    107106    //
    108107    CheckAndWrite();
    109 
    110108    return kTRUE;
    111109}
  • trunk/MagicSoft/Mars/mfileio/MWriteFile.h

    r1381 r2206  
    99{
    1010private:
    11     Bool_t PreProcess(MParList *pList);
    12     Bool_t Process();
    13     Bool_t PostProcess();
     11    Int_t PreProcess(MParList *pList);
     12    Int_t Process();
     13    Int_t PostProcess();
    1414
    1515    virtual Bool_t      IsFileOpen() const = 0;
  • trunk/MagicSoft/Mars/mfilter/MF.cc

    r2173 r2206  
    409409// PreProcess all filters.
    410410//
    411 Bool_t MF::PreProcess(MParList *plist)
     411Int_t MF::PreProcess(MParList *plist)
    412412{
    413413    if (!fF)
     
    431431// Process all filters.
    432432//
    433 Bool_t MF::Process()
     433Int_t MF::Process()
    434434{
    435435    return fF->CallProcess();
     
    440440//  Postprocess all filters.
    441441//
    442 Bool_t MF::PostProcess()
     442Int_t MF::PostProcess()
    443443{
    444444    return fF->CallPostProcess();
  • trunk/MagicSoft/Mars/mfilter/MF.h

    r2123 r2206  
    3737    Bool_t IsExpressionTrue() const;
    3838
    39     Bool_t PreProcess(MParList *pList);
    40     Bool_t Process();
    41     Bool_t PostProcess();
     39    Int_t PreProcess(MParList *pList);
     40    Int_t Process();
     41    Int_t PostProcess();
    4242
    4343    void Print(Option_t *opt="") const;
  • trunk/MagicSoft/Mars/mfilter/MFAlpha.cc

    r2173 r2206  
    8181// --------------------------------------------------------------------------
    8282//
    83 Bool_t MFAlpha::PreProcess(MParList *pList)
     83Int_t MFAlpha::PreProcess(MParList *pList)
    8484{
    8585    if (fHillas)
     
    9696// --------------------------------------------------------------------------
    9797//
    98 Bool_t MFAlpha::Process()
     98Int_t MFAlpha::Process()
    9999{
    100100    const Float_t alpha = fabs(fHillas->GetAlpha());
  • trunk/MagicSoft/Mars/mfilter/MFAlpha.h

    r2173 r2206  
    3232    void StreamPrimitive(ofstream &out) const;
    3333
     34    Int_t PreProcess(MParList *pList);
     35    Int_t Process();
     36
    3437public:
    3538    MFAlpha(const char *cname="MHillas", const char type='>', const Float_t deg=15,
     
    3942
    4043    Bool_t IsExpressionTrue() const { return fResult; }
    41     Bool_t PreProcess(MParList *pList);
    42     Bool_t Process();
    4344
    4445    ClassDef(MFAlpha, 1) // A Filter for cuts in fabs(alpha)
  • trunk/MagicSoft/Mars/mfilter/MFCT1SelBasic.cc

    r2173 r2206  
    9393//
    9494//
    95 Bool_t MFCT1SelBasic::PreProcess(MParList *pList)
     95Int_t MFCT1SelBasic::PreProcess(MParList *pList)
    9696{
    9797    /*
     
    137137}
    138138
     139Int_t MFCT1SelBasic::Set(Int_t rc)
     140{
     141    fCut[rc]++;
     142    fResult=kTRUE;
     143    return kTRUE;
     144}
     145
    139146// --------------------------------------------------------------------------
    140147//
     
    144151// if they are not fullfilled : fResult = kFALSE;
    145152//
    146 Bool_t MFCT1SelBasic::Process()
     153Int_t MFCT1SelBasic::Process()
    147154{
    148155    const Double_t theta = kRad2Deg*fMcEvt->GetTelescopeTheta();
    149156
    150     Int_t rc = 0;
    151157    fResult  = kFALSE;
    152158
    153     if ( theta < fThetaMin )
    154     {
    155       rc = 1;
    156       fResult = kTRUE;
    157     }   
    158     else if ( theta > fThetaMax )
    159     {
    160       rc = 2;
    161       fResult = kTRUE;
    162     }   
    163     else if ( !SwTrigger() )
    164     {
    165       rc = 3;
    166       fResult = kTRUE;
    167     }   
    168 
    169     fCut[rc]++;
     159    if (theta<fThetaMin)
     160        return Set(1);
     161
     162    if (theta>fThetaMax)
     163        return Set(2);
     164
     165    if (!SwTrigger())
     166        return Set(3);
     167
     168    fCut[0]++;
    170169
    171170    return kTRUE;
     
    227226//  Prints some statistics about the Basic selections.
    228227//
    229 Bool_t MFCT1SelBasic::PostProcess()
     228Int_t MFCT1SelBasic::PostProcess()
    230229{
    231230    if (GetNumExecutions()==0)
  • trunk/MagicSoft/Mars/mfilter/MFCT1SelBasic.h

    r2037 r2206  
    3737    Bool_t      fResult;
    3838
    39     Bool_t PreProcess(MParList *pList);
    40     Bool_t Process();
    41     Bool_t PostProcess();
     39    Int_t Set(Int_t rc);
     40
     41    Int_t PreProcess(MParList *pList);
     42    Int_t Process();
     43    Int_t PostProcess();
    4244
    4345    Bool_t IsExpressionTrue() const { return fResult; }
  • trunk/MagicSoft/Mars/mfilter/MFCT1SelFinal.cc

    r2173 r2206  
    9494// Set the pointers
    9595//
    96 Bool_t MFCT1SelFinal::PreProcess(MParList *pList)
     96Int_t MFCT1SelFinal::PreProcess(MParList *pList)
    9797{
    9898    fHilSrc = (MHillasSrc*)pList->FindObject(fHilSrcName, "MHillasSrc");
     
    124124}
    125125
     126Int_t MFCT1SelFinal::Set(Int_t rc)
     127{
     128    fCut[rc]++;
     129    fResult=kTRUE;
     130    return kTRUE;
     131}
     132
    126133// --------------------------------------------------------------------------
    127134//
     
    130137// if cuts are fulfilled set fResult = kTRUE
    131138//
    132 Bool_t MFCT1SelFinal::Process()
     139Int_t MFCT1SelFinal::Process()
    133140{
    134141    const Double_t modalpha = fabs( fHilSrc->GetAlpha() );
    135142    const Double_t h = fHadronness->GetHadronness();
    136143
    137     Int_t rc = 0;
    138144    fResult = kFALSE;
    139145
    140     if ( h>fHadronnessMax )
    141     {
    142       rc = 1;
    143       fResult = kTRUE;
    144     }   
    145     else if ( modalpha > fAlphaMax )
    146     {
    147       rc = 2;
    148       fResult = kTRUE;
    149     }
    150     else if ( fMm2Deg*fHilSrc->GetDist() > fDistMax )
    151     {
    152       rc = 3;
    153       fResult = kTRUE;
    154     }   
     146    if (h>fHadronnessMax)
     147        return Set(1);
    155148
    156     fCut[rc]++;
     149    if (modalpha>fAlphaMax)
     150        return Set(2);
     151
     152    if (fMm2Deg*fHilSrc->GetDist()>fDistMax)
     153        return Set(3);
     154
     155    fCut[0]++;
    157156
    158157    return kTRUE;
     
    163162//  Prints some statistics about the Final selections.
    164163//
    165 Bool_t MFCT1SelFinal::PostProcess()
     164Int_t MFCT1SelFinal::PostProcess()
    166165{
    167166    if (GetNumExecutions()==0)
  • trunk/MagicSoft/Mars/mfilter/MFCT1SelFinal.h

    r2037 r2206  
    3838    Bool_t       fResult;
    3939
    40     Bool_t PreProcess(MParList *pList);
    41     Bool_t Process();
    42     Bool_t PostProcess();
     40    Int_t Set(Int_t rc);
     41
     42    Int_t PreProcess(MParList *pList);
     43    Int_t Process();
     44    Int_t PostProcess();
    4345
    4446    Bool_t IsExpressionTrue() const  { return fResult; }
  • trunk/MagicSoft/Mars/mfilter/MFCT1SelStandard.cc

    r2173 r2206  
    104104// MISSING
    105105//
    106 Bool_t MFCT1SelStandard::PreProcess(MParList *pList)
     106Int_t MFCT1SelStandard::PreProcess(MParList *pList)
    107107{
    108108    fHil = (MHillas*)pList->FindObject(fHilName, "MHillas");
     
    141141}
    142142
     143Bool_t MFCT1SelStandard::Set(Int_t rc)
     144{
     145    fResult = kTRUE;
     146    fCut[rc]++;
     147    return kTRUE;
     148}
    143149// --------------------------------------------------------------------------
    144150//
     
    148154//
    149155//
    150 Bool_t MFCT1SelStandard::Process()
     156Int_t MFCT1SelStandard::Process()
    151157{
    152158    const Double_t length     = fHil->GetLength() * fMm2Deg;
     
    158164    const Int_t numcorepixels = fNewImgPar->GetNumCorePixels();
    159165
    160     Int_t rc = 0;
    161166    fResult  = kFALSE;
    162167
    163     if ( numusedpixels >= fUsedPixelsMax  ||  numcorepixels <= fCorePixelsMin )
    164     {
    165       rc = 1;
    166       fResult = kTRUE;
    167     }   
    168     else if ( size <= fSizeMin )
    169     {
    170       rc = 2;
    171       fResult = kTRUE;
    172     }   
    173     else if ( dist< fDistMin   ||  dist > fDistMax )
    174     {
    175       rc = 3;
    176       fResult = kTRUE;
    177     }   
    178     else if ( length <= fLengthMin   ||  width <= fWidthMin )
    179     {
    180       rc = 4;
    181       fResult = kTRUE;
    182     }   
    183 
    184     fCut[rc]++;
    185 
     168    if (numusedpixels>=fUsedPixelsMax || numcorepixels<=fCorePixelsMin)
     169        return Set(1);
     170
     171    if (size<=fSizeMin )
     172        return Set(2);
     173
     174    if (dist<fDistMin || dist>fDistMax)
     175        return Set(3);
     176
     177    if (length<=fLengthMin || width<=fWidthMin)
     178        return Set(4);
     179
     180    fCut[0]++;
    186181    return kTRUE;
    187182}
     
    191186//  Prints some statistics about the Standard selections.
    192187//
    193 Bool_t MFCT1SelStandard::PostProcess()
     188Int_t MFCT1SelStandard::PostProcess()
    194189{
    195190    if (GetNumExecutions()==0)
  • trunk/MagicSoft/Mars/mfilter/MFCT1SelStandard.h

    r2037 r2206  
    4343    Bool_t       fResult;
    4444
    45     Bool_t PreProcess(MParList *pList);
    46     Bool_t Process();
    47     Bool_t PostProcess();
     45    Int_t PreProcess(MParList *pList);
     46    Int_t Process();
     47    Int_t PostProcess();
    4848
    4949    Bool_t IsExpressionTrue() const  { return fResult; }
     50
     51    Bool_t Set(Int_t rc);
    5052
    5153public:
  • trunk/MagicSoft/Mars/mfilter/MFDataChain.cc

    r2173 r2206  
    7676// --------------------------------------------------------------------------
    7777//
    78 Bool_t MFDataChain::PreProcess(MParList *plist)
     78Int_t MFDataChain::PreProcess(MParList *plist)
    7979{
    8080    return fData.PreProcess(plist);
     
    8383// --------------------------------------------------------------------------
    8484//
    85 Bool_t MFDataChain::Process()
     85Int_t MFDataChain::Process()
    8686{
    8787    switch (fFilterType)
  • trunk/MagicSoft/Mars/mfilter/MFDataChain.h

    r2100 r2206  
    3030    void StreamPrimitive(ofstream &out) const;
    3131
     32    Int_t PreProcess(MParList *pList);
     33    Int_t Process();
     34
    3235public:
    3336    MFDataChain(const char *member, const char type, const Double_t val,
     
    3538
    3639    Bool_t IsExpressionTrue() const { return fResult; }
    37     Bool_t PreProcess(MParList *pList);
    38     Bool_t Process();
    3940
    4041    void Print(Option_t *opt = "") const;
  • trunk/MagicSoft/Mars/mfilter/MFDataMember.cc

    r2173 r2206  
    7676// --------------------------------------------------------------------------
    7777//
    78 Bool_t MFDataMember::PreProcess(MParList *plist)
     78Int_t MFDataMember::PreProcess(MParList *plist)
    7979{
    8080    return fData.PreProcess(plist);
     
    8383// --------------------------------------------------------------------------
    8484//
    85 Bool_t MFDataMember::Process()
     85Int_t MFDataMember::Process()
    8686{
    8787    switch (fFilterType)
  • trunk/MagicSoft/Mars/mfilter/MFDataMember.h

    r1481 r2206  
    3030    void StreamPrimitive(ofstream &out) const;
    3131
     32    Int_t PreProcess(MParList *pList);
     33    Int_t Process();
     34
    3235public:
    3336    MFDataMember(const char *member, const char type, const Double_t val,
     
    3538
    3639    Bool_t IsExpressionTrue() const { return fResult; }
    37     Bool_t PreProcess(MParList *pList);
    38     Bool_t Process();
    3940
    4041    void Print(Option_t *opt = "") const;
  • trunk/MagicSoft/Mars/mfilter/MFEnergySlope.cc

    r2173 r2206  
    8282//  Normalization factor is computed
    8383//
    84 Bool_t MFEnergySlope::PreProcess(MParList *pList)
     84Int_t MFEnergySlope::PreProcess(MParList *pList)
    8585{
    8686 
     
    142142//  run header (requires reflector ver.>0.6 and camera ver.>0.6)
    143143//
    144 Bool_t MFEnergySlope::Process()
     144Int_t MFEnergySlope::Process()
    145145{
    146146  fResult = kTRUE;
  • trunk/MagicSoft/Mars/mfilter/MFEnergySlope.h

    r2009 r2206  
    3131    Float_t fN0;            // Normalization factor
    3232
    33     Bool_t PreProcess(MParList *pList);
    34     Bool_t Process();
     33    Int_t PreProcess(MParList *pList);
     34    Int_t Process();
    3535
    3636public:
  • trunk/MagicSoft/Mars/mfilter/MFEventSelector.cc

    r2173 r2206  
    107107// PreProcess all filters.
    108108//
    109 Bool_t MFEventSelector::PreProcess(MParList *plist)
     109Int_t MFEventSelector::PreProcess(MParList *plist)
    110110{
    111111    memset(fErrors, 0, sizeof(fErrors));
     
    145145// Process all filters.
    146146//
    147 Bool_t MFEventSelector::Process()
     147Int_t MFEventSelector::Process()
    148148{
    149149    Int_t rc;
     
    175175//  Postprocess all filters.
    176176//
    177 Bool_t MFEventSelector::PostProcess()
     177Int_t MFEventSelector::PostProcess()
    178178{
    179179    //---------------------------------
  • trunk/MagicSoft/Mars/mfilter/MFEventSelector.h

    r2118 r2206  
    2727    void StreamPrimitive(ofstream &out) const;
    2828
    29     Bool_t PreProcess(MParList *pList);
    30     Bool_t Process();
    31     Bool_t PostProcess();
     29    Int_t PreProcess(MParList *pList);
     30    Int_t Process();
     31    Int_t PostProcess();
    3232
    3333    enum { kNumTotalFromFile = BIT(14) };
  • trunk/MagicSoft/Mars/mfilter/MFEventSelector2.cc

    r2173 r2206  
    327327//  5) Repreprocess the reading task.
    328328//
    329 Bool_t MFEventSelector2::PreProcess(MParList *parlist)
     329Int_t MFEventSelector2::PreProcess(MParList *parlist)
    330330{
    331331    MTaskList *tasklist = (MTaskList*)parlist->FindObject("MTaskList");
     
    374374//     gRandom->Rndm()*fIs[bin]<=fNom[bin]
    375375//
    376 Bool_t MFEventSelector2::Process()
     376Int_t MFEventSelector2::Process()
    377377{
    378378    fResult = kFALSE;
     
    411411// Update online display if set.
    412412//
    413 Bool_t MFEventSelector2::PostProcess()
     413Int_t MFEventSelector2::PostProcess()
    414414{
    415415    if (!fCanvas || !fDisplay)
  • trunk/MagicSoft/Mars/mfilter/MFEventSelector2.h

    r2173 r2206  
    4848    Bool_t PreProcessData(MParList *parlist);
    4949
    50     Bool_t PreProcess(MParList *parlist);
    51     Bool_t Process();
    52     Bool_t PostProcess();
     50    Int_t PreProcess(MParList *parlist);
     51    Int_t Process();
     52    Int_t PostProcess();
    5353
    5454public:
  • trunk/MagicSoft/Mars/mfilter/MFParticleId.cc

    r2173 r2206  
    9191// --------------------------------------------------------------------------
    9292//
    93 Bool_t MFParticleId::PreProcess(MParList *pList)
     93Int_t MFParticleId::PreProcess(MParList *pList)
    9494{
    9595    if (fMcEvt)
     
    106106// --------------------------------------------------------------------------
    107107//
    108 Bool_t MFParticleId::Process()
     108Int_t MFParticleId::Process()
    109109{
    110110    const Int_t id = fMcEvt->GetPartId();
  • trunk/MagicSoft/Mars/mfilter/MFParticleId.h

    r1664 r2206  
    3232    void StreamPrimitive(ofstream &out) const;
    3333
     34    Int_t PreProcess(MParList *pList);
     35    Int_t Process();
     36
    3437public:
    3538    MFParticleId(const char *cname="MMcEvt", const char type='=', const Int_t val=0,
     
    3942
    4043    Bool_t IsExpressionTrue() const;
    41     Bool_t PreProcess(MParList *pList);
    42     Bool_t Process();
    4344
    4445    ClassDef(MFParticleId, 1) // A Filter for the (corsika) particle Id
  • trunk/MagicSoft/Mars/mfilter/MFTriggerLvl1.cc

    r2173 r2206  
    8787// --------------------------------------------------------------------------
    8888//
    89 Bool_t MFTriggerLvl1::PreProcess(MParList *pList)
     89Int_t MFTriggerLvl1::PreProcess(MParList *pList)
    9090{
    9191    if (fMcTrig)
     
    102102// --------------------------------------------------------------------------
    103103//
    104 Bool_t MFTriggerLvl1::Process()
     104Int_t MFTriggerLvl1::Process()
    105105{
    106106    const Int_t lvl1 = fMcTrig->GetFirstLevel();
  • trunk/MagicSoft/Mars/mfilter/MFTriggerLvl1.h

    r1481 r2206  
    3232    void StreamPrimitive(ofstream &out) const;
    3333
     34    Int_t PreProcess(MParList *pList);
     35    Int_t Process();
     36
    3437public:
    3538    MFTriggerLvl1(const char *cname="MMcTrig", const char type='>', const Int_t val=0,
     
    3942
    4043    Bool_t IsExpressionTrue() const;
    41     Bool_t PreProcess(MParList *pList);
    42     Bool_t Process();
    4344
    4445    ClassDef(MFTriggerLvl1, 1) // A Filter for the Level 1 Trigger
  • trunk/MagicSoft/Mars/mfilter/MFTriggerLvl2.cc

    r2173 r2206  
    8888// --------------------------------------------------------------------------
    8989//
    90 Bool_t MFTriggerLvl2::PreProcess(MParList *pList)
     90Int_t MFTriggerLvl2::PreProcess(MParList *pList)
    9191{
    9292    if (fcell)
     
    104104// --------------------------------------------------------------------------
    105105//
    106 Bool_t MFTriggerLvl2::Process()
     106Int_t MFTriggerLvl2::Process()
    107107{
    108108
  • trunk/MagicSoft/Mars/mfilter/MFTriggerLvl2.h

    r1777 r2206  
    3838    void StreamPrimitive(ofstream &out) const;
    3939
     40    Int_t PreProcess(MParList *pList);
     41    Int_t Process();
     42
    4043public:
    4144
     
    4649
    4750    Bool_t IsExpressionTrue() const;
    48     Bool_t PreProcess(MParList *pList);
    49     Bool_t Process();
    5051
    5152    ClassDef(MFTriggerLvl2, 1) // A Filter for the Level 2 Trigger
  • trunk/MagicSoft/Mars/mfilter/MFilterList.cc

    r2173 r2206  
    6666    fTitle = title ? title : gsDefTitle.Data();
    6767
     68    gROOT->GetListOfCleanups()->Add(&fFilters);
     69    fFilters.SetBit(kMustCleanup);
     70
    6871    fFilterType = kEAnd;
    6972
     
    168171    *fLog << inf << "Adding " << name << " to " << GetName() << "... " << flush;
    169172
     173    filter->SetBit(kMustCleanup);
    170174    fFilters.Add(filter);
    171175
     
    180184// PreProcesses all filters in the list
    181185//
    182 Bool_t MFilterList::PreProcess(MParList *pList)
     186Int_t MFilterList::PreProcess(MParList *pList)
    183187{
    184188    TIter Next(&fFilters);
     
    204208// Processes (updates) all filters in the list.
    205209//
    206 Bool_t MFilterList::Process()
     210Int_t MFilterList::Process()
    207211{
    208212    TIter Next(&fFilters);
     
    224228// PostProcesses all filters in the list.
    225229//
    226 Bool_t MFilterList::PostProcess()
     230Int_t MFilterList::PostProcess()
    227231{
    228232    TIter Next(&fFilters);
  • trunk/MagicSoft/Mars/mfilter/MFilterList.h

    r2173 r2206  
    4545    Bool_t IsExpressionTrue() const;
    4646
    47     Bool_t PreProcess(MParList *pList);
    48     Bool_t Process();
    49     Bool_t PostProcess();
    50 
    5147    void Print(Option_t *opt = "") const;
    5248    TString GetRule() const { return GetRule(""); }
    5349    TString GetRule(Option_t *opt) const;
     50
     51    Int_t PreProcess(MParList *pList);
     52    Int_t Process();
     53    Int_t PostProcess();
    5454
    5555    ClassDef(MFilterList, 1)            // List to combine several filters logically
  • trunk/MagicSoft/Mars/mgui/MCamEvent.cc

    r2178 r2206  
    3030#include "MCamEvent.h"
    3131
     32#include "MGeomCam.h"
     33
    3234ClassImp(MCamEvent);
     35
  • trunk/MagicSoft/Mars/mgui/MCamEvent.h

    r2178 r2206  
    1818{
    1919public:
    20     virtual Bool_t GetPixelContent(Float_t &val, Int_t idx, Float_t ratio=1, Int_t type=0) const = 0;
     20    virtual Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const = 0;
    2121    virtual void   DrawPixelContent(Int_t num) const = 0;
    2222
    23     ClassDef(MCamEvent, 0)    // A hexagon for MAGIC
     23    ClassDef(MCamEvent, 0) // A camera event
    2424};
    2525
  • trunk/MagicSoft/Mars/mhist/MFillH.cc

    r2178 r2206  
    360360// with the same type as the given object name.
    361361//
    362 Bool_t MFillH::PreProcess(MParList *pList)
     362Int_t MFillH::PreProcess(MParList *pList)
    363363{
    364364    if (fIndex)
     
    467467// Fills the data from the parameter conatiner into the histogram container
    468468//
    469 Bool_t MFillH::Process()
     469Int_t MFillH::Process()
    470470{
    471471    if (fIndex)
     
    485485// has been filled into the histogram.
    486486//
    487 Bool_t MFillH::PostProcess()
     487Int_t MFillH::PostProcess()
    488488{
    489489    //
  • trunk/MagicSoft/Mars/mhist/MFillH.h

    r2117 r2206  
    5959    void SetWeight(const char *name) { fWeightName = name; }
    6060
    61     Bool_t PreProcess(MParList *pList);
    62     Bool_t Process();
    63     Bool_t PostProcess();
     61    Int_t PreProcess(MParList *pList);
     62    Int_t Process();
     63    Int_t PostProcess();
    6464
    6565    ClassDef(MFillH, 2) // Task to fill a histogram with data from a parameter container
  • trunk/MagicSoft/Mars/mhist/MHCerPhotEvt.cc

    r2178 r2206  
    3636
    3737#include "MParList.h"
    38 #include "MCerPhotEvt.h"
     38#include "MCamEvent.h"
    3939#include "MCamDisplay.h"
    4040
     
    4848// --------------------------------------------------------------------------
    4949//
    50 // Reset all pixels to 0 and reset fEntries to 0.
    51 //
    52 void MHCerPhotEvt::Clear(const Option_t *)
    53 {
    54     fSum.Reset();
    55 //    fSum.InitSize(577);
    56     for (int i=0; i<577; i++)
    57     {
    58         fSum.AddPixel(i, 0, 0);
    59         fSum[i].SetPixelUnused();
    60     }
    61     fSum.FixSize();
    62     fEntries = 0;
    63 }
    64 
    65 // --------------------------------------------------------------------------
    66 //
    6750// Initialize the name and title of the task.
    6851// Resets the sum histogram
    6952//
    7053MHCerPhotEvt::MHCerPhotEvt(const char *name, const char *title)
    71     : fCam(NULL), fEvt(NULL), fDispl(NULL)
     54    : fSum(NULL), fEvt(NULL)
    7255{
    7356    //
     
    7659    fName  = name  ? name  : "MHCerPhotEvt";
    7760    fTitle = title ? title : "Average of MCerPhotEvts";
    78 
    79     Clear();
    8061}
    8162
     
    8667MHCerPhotEvt::~MHCerPhotEvt()
    8768{
    88     if (fDispl)
    89         delete fDispl;
     69    if (fSum)
     70        delete fSum;
    9071}
    9172
     
    9980Bool_t MHCerPhotEvt::SetupFill(const MParList *plist)
    10081{
    101     fEvt = (MCerPhotEvt*)plist->FindObject("MCerPhotEvt");
     82    fEvt = (MCamEvent*)plist->FindObject(fNameEvt, "MCamEvent");
    10283    if (!fEvt)
    10384        *fLog << warn << GetDescriptor() << ": No MCerPhotEvt available..." << endl;
    10485
    105     fCam = (MGeomCam*)plist->FindObject("MGeomCam");
    106     if (!fCam)
     86    MGeomCam *cam = (MGeomCam*)plist->FindObject("MGeomCam");
     87    if (!cam)
    10788        *fLog << warn << GetDescriptor() << ": No MGeomCam found." << endl;
    10889
    109     Clear();
     90    if (fSum)
     91        delete (fSum);
     92    fSum = new MCamDisplay(*cam, fNameEvt+";avg", fNameEvt+" Avarage");
    11093
    11194    return kTRUE;
     
    118101Bool_t MHCerPhotEvt::Fill(const MParContainer *par, const Stat_t w)
    119102{
    120     const MCerPhotEvt *evt = par ? (MCerPhotEvt*)par : fEvt;
     103    const MCamEvent *evt = par ? dynamic_cast<const MCamEvent*>(par) : fEvt;
    121104    if (!evt)
    122105    {
     
    124107        return kFALSE;
    125108    }
    126 
    127     const UInt_t n = evt->GetNumPixels();
    128 
    129     for (UInt_t idx=0; idx<n; idx++)
    130     {
    131         Float_t val;
    132         if (!evt->GetPixelContent(val, idx))
    133             continue;
    134 
    135         fSum[idx].SetPixelUsed();
    136         fSum[idx].AddNumPhotons(val);
    137     }
    138 
    139     fEntries++;
     109    fSum->AddCamContent(*evt);
    140110
    141111    return kTRUE;
     
    148118Bool_t MHCerPhotEvt::Finalize()
    149119{
    150     if (fEntries<1)
    151         *fLog << warn << "WARNING - " << GetDescriptor() << " doesn't contain entries." << endl;
    152     else
    153         fSum.Scale(fEntries);
     120    if (fSum->GetEntries()>0)
     121        fSum->Scale(1./fSum->GetEntries());
    154122    return kTRUE;
    155123}
    156 
     124/*
    157125// --------------------------------------------------------------------------
    158126//
     
    161129void MHCerPhotEvt::Draw(Option_t *)
    162130{
    163     if (!fCam)
     131    if (!fSum)
    164132    {
    165133        *fLog << warn << "WARNING - Cannot draw " << GetDescriptor() << ": No Camera Geometry available." << endl;
     
    169137    TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this, 750, 600);
    170138    pad->SetBorderMode(0);
     139    //pad->Divide(1,1);
     140    //gPad->SetBorderMode(0);
    171141
    172142    AppendPad("");
     
    179149void MHCerPhotEvt::Paint(Option_t *option)
    180150{
    181     if (!fCam)
    182     {
    183         *fLog << warn << "WARNING - Cannot paint " << GetDescriptor() << ": No Camera Geometry available." << endl;
     151    if (!fSum)
    184152        return;
    185     }
    186153
    187     if (!fDispl)
    188         fDispl = new MCamDisplay(fCam);
     154    fSum->Paint();
     155}
     156*/
    189157
    190     fDispl->Fill(fSum);
    191     fDispl->Paint();
     158TH1 *MHCerPhotEvt::GetHistByName(const TString name)
     159{
     160    return fSum;
    192161}
  • trunk/MagicSoft/Mars/mhist/MHCerPhotEvt.h

    r2173 r2206  
    66#endif
    77
    8 #ifndef MARS_MCerPhotEvt
    9 #include "MCerPhotEvt.h"
    10 #endif
    11 
    12 class TH1D;
    138class MCamDisplay;
     9class MCamEvent;
    1410
    1511class MHCerPhotEvt : public MH
    1612{
    1713private:
    18     MCerPhotEvt  fSum;      // storing the sum
    19     Int_t        fEntries;  // number of entries in the histogram
    20     MGeomCam    *fCam;      // the present geometry
    21     MCerPhotEvt *fEvt;      //! the current event
    22     MCamDisplay *fDispl;    //! the camera display
     14    MCamDisplay *fSum;      // storing the sum
     15    MCamEvent   *fEvt;      //! the current event
     16
     17    TString fNameEvt;
     18
     19    Bool_t SetupFill(const MParList *pList);
     20    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
     21    Bool_t Finalize();
    2322
    2423public:
     
    2625    ~MHCerPhotEvt();
    2726
    28     void Clear(const Option_t *o="");
     27    void SetNameEvt(const TString name) { fNameEvt = name; }
    2928
    30     Bool_t SetupFill(const MParList *pList);
    31     Bool_t Fill(const MParContainer *par, const Stat_t w=1);
    32     Bool_t Finalize();
    33 
    34     TH1 *GetHistByName(const TString name) { return NULL; }
    35 
    36     const MCerPhotEvt &GetSum() const { return fSum; }
    37 
    38     void Draw(Option_t *opt="");
    39     void Paint(Option_t *option="");
     29    TH1 *GetHistByName(const TString name="");
    4030
    4131    ClassDef(MHCerPhotEvt, 1) // Histogram to sum camera events
Note: See TracChangeset for help on using the changeset viewer.