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

Legend:

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