Changeset 2206 for trunk/MagicSoft/Mars/mfilter
- Timestamp:
- 06/23/03 11:01:53 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mfilter
- Files:
-
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mfilter/MF.cc
r2173 r2206 409 409 // PreProcess all filters. 410 410 // 411 Bool_t MF::PreProcess(MParList *plist)411 Int_t MF::PreProcess(MParList *plist) 412 412 { 413 413 if (!fF) … … 431 431 // Process all filters. 432 432 // 433 Bool_t MF::Process()433 Int_t MF::Process() 434 434 { 435 435 return fF->CallProcess(); … … 440 440 // Postprocess all filters. 441 441 // 442 Bool_t MF::PostProcess()442 Int_t MF::PostProcess() 443 443 { 444 444 return fF->CallPostProcess(); -
trunk/MagicSoft/Mars/mfilter/MF.h
r2123 r2206 37 37 Bool_t IsExpressionTrue() const; 38 38 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(); 42 42 43 43 void Print(Option_t *opt="") const; -
trunk/MagicSoft/Mars/mfilter/MFAlpha.cc
r2173 r2206 81 81 // -------------------------------------------------------------------------- 82 82 // 83 Bool_t MFAlpha::PreProcess(MParList *pList)83 Int_t MFAlpha::PreProcess(MParList *pList) 84 84 { 85 85 if (fHillas) … … 96 96 // -------------------------------------------------------------------------- 97 97 // 98 Bool_t MFAlpha::Process()98 Int_t MFAlpha::Process() 99 99 { 100 100 const Float_t alpha = fabs(fHillas->GetAlpha()); -
trunk/MagicSoft/Mars/mfilter/MFAlpha.h
r2173 r2206 32 32 void StreamPrimitive(ofstream &out) const; 33 33 34 Int_t PreProcess(MParList *pList); 35 Int_t Process(); 36 34 37 public: 35 38 MFAlpha(const char *cname="MHillas", const char type='>', const Float_t deg=15, … … 39 42 40 43 Bool_t IsExpressionTrue() const { return fResult; } 41 Bool_t PreProcess(MParList *pList);42 Bool_t Process();43 44 44 45 ClassDef(MFAlpha, 1) // A Filter for cuts in fabs(alpha) -
trunk/MagicSoft/Mars/mfilter/MFCT1SelBasic.cc
r2173 r2206 93 93 // 94 94 // 95 Bool_t MFCT1SelBasic::PreProcess(MParList *pList)95 Int_t MFCT1SelBasic::PreProcess(MParList *pList) 96 96 { 97 97 /* … … 137 137 } 138 138 139 Int_t MFCT1SelBasic::Set(Int_t rc) 140 { 141 fCut[rc]++; 142 fResult=kTRUE; 143 return kTRUE; 144 } 145 139 146 // -------------------------------------------------------------------------- 140 147 // … … 144 151 // if they are not fullfilled : fResult = kFALSE; 145 152 // 146 Bool_t MFCT1SelBasic::Process()153 Int_t MFCT1SelBasic::Process() 147 154 { 148 155 const Double_t theta = kRad2Deg*fMcEvt->GetTelescopeTheta(); 149 156 150 Int_t rc = 0;151 157 fResult = kFALSE; 152 158 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]++; 170 169 171 170 return kTRUE; … … 227 226 // Prints some statistics about the Basic selections. 228 227 // 229 Bool_t MFCT1SelBasic::PostProcess()228 Int_t MFCT1SelBasic::PostProcess() 230 229 { 231 230 if (GetNumExecutions()==0) -
trunk/MagicSoft/Mars/mfilter/MFCT1SelBasic.h
r2037 r2206 37 37 Bool_t fResult; 38 38 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(); 42 44 43 45 Bool_t IsExpressionTrue() const { return fResult; } -
trunk/MagicSoft/Mars/mfilter/MFCT1SelFinal.cc
r2173 r2206 94 94 // Set the pointers 95 95 // 96 Bool_t MFCT1SelFinal::PreProcess(MParList *pList)96 Int_t MFCT1SelFinal::PreProcess(MParList *pList) 97 97 { 98 98 fHilSrc = (MHillasSrc*)pList->FindObject(fHilSrcName, "MHillasSrc"); … … 124 124 } 125 125 126 Int_t MFCT1SelFinal::Set(Int_t rc) 127 { 128 fCut[rc]++; 129 fResult=kTRUE; 130 return kTRUE; 131 } 132 126 133 // -------------------------------------------------------------------------- 127 134 // … … 130 137 // if cuts are fulfilled set fResult = kTRUE 131 138 // 132 Bool_t MFCT1SelFinal::Process()139 Int_t MFCT1SelFinal::Process() 133 140 { 134 141 const Double_t modalpha = fabs( fHilSrc->GetAlpha() ); 135 142 const Double_t h = fHadronness->GetHadronness(); 136 143 137 Int_t rc = 0;138 144 fResult = kFALSE; 139 145 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); 155 148 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]++; 157 156 158 157 return kTRUE; … … 163 162 // Prints some statistics about the Final selections. 164 163 // 165 Bool_t MFCT1SelFinal::PostProcess()164 Int_t MFCT1SelFinal::PostProcess() 166 165 { 167 166 if (GetNumExecutions()==0) -
trunk/MagicSoft/Mars/mfilter/MFCT1SelFinal.h
r2037 r2206 38 38 Bool_t fResult; 39 39 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(); 43 45 44 46 Bool_t IsExpressionTrue() const { return fResult; } -
trunk/MagicSoft/Mars/mfilter/MFCT1SelStandard.cc
r2173 r2206 104 104 // MISSING 105 105 // 106 Bool_t MFCT1SelStandard::PreProcess(MParList *pList)106 Int_t MFCT1SelStandard::PreProcess(MParList *pList) 107 107 { 108 108 fHil = (MHillas*)pList->FindObject(fHilName, "MHillas"); … … 141 141 } 142 142 143 Bool_t MFCT1SelStandard::Set(Int_t rc) 144 { 145 fResult = kTRUE; 146 fCut[rc]++; 147 return kTRUE; 148 } 143 149 // -------------------------------------------------------------------------- 144 150 // … … 148 154 // 149 155 // 150 Bool_t MFCT1SelStandard::Process()156 Int_t MFCT1SelStandard::Process() 151 157 { 152 158 const Double_t length = fHil->GetLength() * fMm2Deg; … … 158 164 const Int_t numcorepixels = fNewImgPar->GetNumCorePixels(); 159 165 160 Int_t rc = 0;161 166 fResult = kFALSE; 162 167 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]++; 186 181 return kTRUE; 187 182 } … … 191 186 // Prints some statistics about the Standard selections. 192 187 // 193 Bool_t MFCT1SelStandard::PostProcess()188 Int_t MFCT1SelStandard::PostProcess() 194 189 { 195 190 if (GetNumExecutions()==0) -
trunk/MagicSoft/Mars/mfilter/MFCT1SelStandard.h
r2037 r2206 43 43 Bool_t fResult; 44 44 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(); 48 48 49 49 Bool_t IsExpressionTrue() const { return fResult; } 50 51 Bool_t Set(Int_t rc); 50 52 51 53 public: -
trunk/MagicSoft/Mars/mfilter/MFDataChain.cc
r2173 r2206 76 76 // -------------------------------------------------------------------------- 77 77 // 78 Bool_t MFDataChain::PreProcess(MParList *plist)78 Int_t MFDataChain::PreProcess(MParList *plist) 79 79 { 80 80 return fData.PreProcess(plist); … … 83 83 // -------------------------------------------------------------------------- 84 84 // 85 Bool_t MFDataChain::Process()85 Int_t MFDataChain::Process() 86 86 { 87 87 switch (fFilterType) -
trunk/MagicSoft/Mars/mfilter/MFDataChain.h
r2100 r2206 30 30 void StreamPrimitive(ofstream &out) const; 31 31 32 Int_t PreProcess(MParList *pList); 33 Int_t Process(); 34 32 35 public: 33 36 MFDataChain(const char *member, const char type, const Double_t val, … … 35 38 36 39 Bool_t IsExpressionTrue() const { return fResult; } 37 Bool_t PreProcess(MParList *pList);38 Bool_t Process();39 40 40 41 void Print(Option_t *opt = "") const; -
trunk/MagicSoft/Mars/mfilter/MFDataMember.cc
r2173 r2206 76 76 // -------------------------------------------------------------------------- 77 77 // 78 Bool_t MFDataMember::PreProcess(MParList *plist)78 Int_t MFDataMember::PreProcess(MParList *plist) 79 79 { 80 80 return fData.PreProcess(plist); … … 83 83 // -------------------------------------------------------------------------- 84 84 // 85 Bool_t MFDataMember::Process()85 Int_t MFDataMember::Process() 86 86 { 87 87 switch (fFilterType) -
trunk/MagicSoft/Mars/mfilter/MFDataMember.h
r1481 r2206 30 30 void StreamPrimitive(ofstream &out) const; 31 31 32 Int_t PreProcess(MParList *pList); 33 Int_t Process(); 34 32 35 public: 33 36 MFDataMember(const char *member, const char type, const Double_t val, … … 35 38 36 39 Bool_t IsExpressionTrue() const { return fResult; } 37 Bool_t PreProcess(MParList *pList);38 Bool_t Process();39 40 40 41 void Print(Option_t *opt = "") const; -
trunk/MagicSoft/Mars/mfilter/MFEnergySlope.cc
r2173 r2206 82 82 // Normalization factor is computed 83 83 // 84 Bool_t MFEnergySlope::PreProcess(MParList *pList)84 Int_t MFEnergySlope::PreProcess(MParList *pList) 85 85 { 86 86 … … 142 142 // run header (requires reflector ver.>0.6 and camera ver.>0.6) 143 143 // 144 Bool_t MFEnergySlope::Process()144 Int_t MFEnergySlope::Process() 145 145 { 146 146 fResult = kTRUE; -
trunk/MagicSoft/Mars/mfilter/MFEnergySlope.h
r2009 r2206 31 31 Float_t fN0; // Normalization factor 32 32 33 Bool_t PreProcess(MParList *pList);34 Bool_t Process();33 Int_t PreProcess(MParList *pList); 34 Int_t Process(); 35 35 36 36 public: -
trunk/MagicSoft/Mars/mfilter/MFEventSelector.cc
r2173 r2206 107 107 // PreProcess all filters. 108 108 // 109 Bool_t MFEventSelector::PreProcess(MParList *plist)109 Int_t MFEventSelector::PreProcess(MParList *plist) 110 110 { 111 111 memset(fErrors, 0, sizeof(fErrors)); … … 145 145 // Process all filters. 146 146 // 147 Bool_t MFEventSelector::Process()147 Int_t MFEventSelector::Process() 148 148 { 149 149 Int_t rc; … … 175 175 // Postprocess all filters. 176 176 // 177 Bool_t MFEventSelector::PostProcess()177 Int_t MFEventSelector::PostProcess() 178 178 { 179 179 //--------------------------------- -
trunk/MagicSoft/Mars/mfilter/MFEventSelector.h
r2118 r2206 27 27 void StreamPrimitive(ofstream &out) const; 28 28 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(); 32 32 33 33 enum { kNumTotalFromFile = BIT(14) }; -
trunk/MagicSoft/Mars/mfilter/MFEventSelector2.cc
r2173 r2206 327 327 // 5) Repreprocess the reading task. 328 328 // 329 Bool_t MFEventSelector2::PreProcess(MParList *parlist)329 Int_t MFEventSelector2::PreProcess(MParList *parlist) 330 330 { 331 331 MTaskList *tasklist = (MTaskList*)parlist->FindObject("MTaskList"); … … 374 374 // gRandom->Rndm()*fIs[bin]<=fNom[bin] 375 375 // 376 Bool_t MFEventSelector2::Process()376 Int_t MFEventSelector2::Process() 377 377 { 378 378 fResult = kFALSE; … … 411 411 // Update online display if set. 412 412 // 413 Bool_t MFEventSelector2::PostProcess()413 Int_t MFEventSelector2::PostProcess() 414 414 { 415 415 if (!fCanvas || !fDisplay) -
trunk/MagicSoft/Mars/mfilter/MFEventSelector2.h
r2173 r2206 48 48 Bool_t PreProcessData(MParList *parlist); 49 49 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(); 53 53 54 54 public: -
trunk/MagicSoft/Mars/mfilter/MFParticleId.cc
r2173 r2206 91 91 // -------------------------------------------------------------------------- 92 92 // 93 Bool_t MFParticleId::PreProcess(MParList *pList)93 Int_t MFParticleId::PreProcess(MParList *pList) 94 94 { 95 95 if (fMcEvt) … … 106 106 // -------------------------------------------------------------------------- 107 107 // 108 Bool_t MFParticleId::Process()108 Int_t MFParticleId::Process() 109 109 { 110 110 const Int_t id = fMcEvt->GetPartId(); -
trunk/MagicSoft/Mars/mfilter/MFParticleId.h
r1664 r2206 32 32 void StreamPrimitive(ofstream &out) const; 33 33 34 Int_t PreProcess(MParList *pList); 35 Int_t Process(); 36 34 37 public: 35 38 MFParticleId(const char *cname="MMcEvt", const char type='=', const Int_t val=0, … … 39 42 40 43 Bool_t IsExpressionTrue() const; 41 Bool_t PreProcess(MParList *pList);42 Bool_t Process();43 44 44 45 ClassDef(MFParticleId, 1) // A Filter for the (corsika) particle Id -
trunk/MagicSoft/Mars/mfilter/MFTriggerLvl1.cc
r2173 r2206 87 87 // -------------------------------------------------------------------------- 88 88 // 89 Bool_t MFTriggerLvl1::PreProcess(MParList *pList)89 Int_t MFTriggerLvl1::PreProcess(MParList *pList) 90 90 { 91 91 if (fMcTrig) … … 102 102 // -------------------------------------------------------------------------- 103 103 // 104 Bool_t MFTriggerLvl1::Process()104 Int_t MFTriggerLvl1::Process() 105 105 { 106 106 const Int_t lvl1 = fMcTrig->GetFirstLevel(); -
trunk/MagicSoft/Mars/mfilter/MFTriggerLvl1.h
r1481 r2206 32 32 void StreamPrimitive(ofstream &out) const; 33 33 34 Int_t PreProcess(MParList *pList); 35 Int_t Process(); 36 34 37 public: 35 38 MFTriggerLvl1(const char *cname="MMcTrig", const char type='>', const Int_t val=0, … … 39 42 40 43 Bool_t IsExpressionTrue() const; 41 Bool_t PreProcess(MParList *pList);42 Bool_t Process();43 44 44 45 ClassDef(MFTriggerLvl1, 1) // A Filter for the Level 1 Trigger -
trunk/MagicSoft/Mars/mfilter/MFTriggerLvl2.cc
r2173 r2206 88 88 // -------------------------------------------------------------------------- 89 89 // 90 Bool_t MFTriggerLvl2::PreProcess(MParList *pList)90 Int_t MFTriggerLvl2::PreProcess(MParList *pList) 91 91 { 92 92 if (fcell) … … 104 104 // -------------------------------------------------------------------------- 105 105 // 106 Bool_t MFTriggerLvl2::Process()106 Int_t MFTriggerLvl2::Process() 107 107 { 108 108 -
trunk/MagicSoft/Mars/mfilter/MFTriggerLvl2.h
r1777 r2206 38 38 void StreamPrimitive(ofstream &out) const; 39 39 40 Int_t PreProcess(MParList *pList); 41 Int_t Process(); 42 40 43 public: 41 44 … … 46 49 47 50 Bool_t IsExpressionTrue() const; 48 Bool_t PreProcess(MParList *pList);49 Bool_t Process();50 51 51 52 ClassDef(MFTriggerLvl2, 1) // A Filter for the Level 2 Trigger -
trunk/MagicSoft/Mars/mfilter/MFilterList.cc
r2173 r2206 66 66 fTitle = title ? title : gsDefTitle.Data(); 67 67 68 gROOT->GetListOfCleanups()->Add(&fFilters); 69 fFilters.SetBit(kMustCleanup); 70 68 71 fFilterType = kEAnd; 69 72 … … 168 171 *fLog << inf << "Adding " << name << " to " << GetName() << "... " << flush; 169 172 173 filter->SetBit(kMustCleanup); 170 174 fFilters.Add(filter); 171 175 … … 180 184 // PreProcesses all filters in the list 181 185 // 182 Bool_t MFilterList::PreProcess(MParList *pList)186 Int_t MFilterList::PreProcess(MParList *pList) 183 187 { 184 188 TIter Next(&fFilters); … … 204 208 // Processes (updates) all filters in the list. 205 209 // 206 Bool_t MFilterList::Process()210 Int_t MFilterList::Process() 207 211 { 208 212 TIter Next(&fFilters); … … 224 228 // PostProcesses all filters in the list. 225 229 // 226 Bool_t MFilterList::PostProcess()230 Int_t MFilterList::PostProcess() 227 231 { 228 232 TIter Next(&fFilters); -
trunk/MagicSoft/Mars/mfilter/MFilterList.h
r2173 r2206 45 45 Bool_t IsExpressionTrue() const; 46 46 47 Bool_t PreProcess(MParList *pList);48 Bool_t Process();49 Bool_t PostProcess();50 51 47 void Print(Option_t *opt = "") const; 52 48 TString GetRule() const { return GetRule(""); } 53 49 TString GetRule(Option_t *opt) const; 50 51 Int_t PreProcess(MParList *pList); 52 Int_t Process(); 53 Int_t PostProcess(); 54 54 55 55 ClassDef(MFilterList, 1) // List to combine several filters logically
Note:
See TracChangeset
for help on using the changeset viewer.