Changeset 2206
- Timestamp:
- 06/23/03 11:01:53 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 111 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MBlindPixelCalc.cc
r2173 r2206 107 107 // from the monte carlo run header. 108 108 // 109 Bool_t MBlindPixelCalc::PreProcess (MParList *pList)109 Int_t MBlindPixelCalc::PreProcess (MParList *pList) 110 110 { 111 111 if (TESTBIT(fFlags, kUseBlindPixels)) … … 252 252 // Treat the blind pixels 253 253 // 254 Bool_t MBlindPixelCalc::Process()254 Int_t MBlindPixelCalc::Process() 255 255 { 256 256 if (TESTBIT(fFlags, kUseInterpolation) && fGeomCam) -
trunk/MagicSoft/Mars/manalysis/MBlindPixelCalc.h
r1574 r2206 36 36 void StreamPrimitive(ofstream &out) const; 37 37 38 Int_t PreProcess(MParList *pList); 39 Int_t Process(); 40 38 41 public: 39 42 MBlindPixelCalc(const char *name=NULL, const char *title=NULL); … … 52 55 } 53 56 54 Bool_t PreProcess(MParList *pList);55 Bool_t Process();56 57 57 void SetPixels(Int_t num, Short_t *ids); 58 58 void SetPixels(const TArrayS pix) { SetPixels((Int_t)pix.GetSize(), (Short_t*)pix.GetArray()); } -
trunk/MagicSoft/Mars/manalysis/MCT1PadONOFF.cc
r2196 r2206 891 891 // Set the pointers and prepare the histograms 892 892 // 893 Bool_t MCT1PadONOFF::PreProcess(MParList *pList)893 Int_t MCT1PadONOFF::PreProcess(MParList *pList) 894 894 { 895 895 if ( !fHSigmaTheta || !fHSigmaThetaON || !fHSigmaThetaOFF || … … 987 987 // idealy the events to be padded should have been generated without NSB 988 988 // 989 Bool_t MCT1PadONOFF::Process()989 Int_t MCT1PadONOFF::Process() 990 990 { 991 991 //*fLog << "Entry MCT1PadONOFF::Process();" << endl; … … 1622 1622 // 1623 1623 // 1624 Bool_t MCT1PadONOFF::PostProcess()1624 Int_t MCT1PadONOFF::PostProcess() 1625 1625 { 1626 1626 if (GetNumExecutions() != 0) -
trunk/MagicSoft/Mars/manalysis/MCT1PadONOFF.h
r2167 r2206 87 87 void SetDataType(const char *type); // type of data to be padded 88 88 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(); 92 92 93 93 void SetPadFlag(Int_t padflag); -
trunk/MagicSoft/Mars/manalysis/MCT1PadSchweizer.cc
r2175 r2206 181 181 // Set the pointers and prepare the histograms 182 182 // 183 Bool_t MCT1PadSchweizer::PreProcess(MParList *pList)183 Int_t MCT1PadSchweizer::PreProcess(MParList *pList) 184 184 { 185 185 if ( !fHSigmaTheta || !fHSigmaPixTheta || !fHDiffPixTheta || … … 266 266 // idealy the events to be padded should have been generated without NSB 267 267 // 268 Bool_t MCT1PadSchweizer::Process()268 Int_t MCT1PadSchweizer::Process() 269 269 { 270 270 //*fLog << "Entry MCT1PadSchweizer::Process();" << endl; … … 731 731 // 732 732 // 733 Bool_t MCT1PadSchweizer::PostProcess()733 Int_t MCT1PadSchweizer::PostProcess() 734 734 { 735 735 if (GetNumExecutions() != 0) -
trunk/MagicSoft/Mars/manalysis/MCT1PadSchweizer.h
r2167 r2206 60 60 TH2D *hist2Pix, TH2D *hist2PixN); 61 61 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(); 65 65 66 66 void SetPadFlag(Int_t padflag); -
trunk/MagicSoft/Mars/manalysis/MCT1PointingCorrCalc.cc
r2173 r2206 60 60 // -------------------------------------------------------------------------- 61 61 // 62 Bool_t MCT1PointingCorrCalc::PreProcess(MParList *pList)62 Int_t MCT1PointingCorrCalc::PreProcess(MParList *pList) 63 63 { 64 64 MGeomCam *geom = (MGeomCam*)pList->FindObject("MGeomCam"); … … 70 70 } 71 71 72 fHourAngle = (MParameterD*)pList->FindObject("HourAngle", "MParameterD");72 fHourAngle = (MParameterD*)pList->FindObject("HourAngle", "MParameterD"); 73 73 if (!fHourAngle) 74 74 { … … 95 95 // the parametrization is for Mkn421 2001 data (Daniel Kranich) 96 96 // 97 Bool_t MCT1PointingCorrCalc::Process()97 Int_t MCT1PointingCorrCalc::Process() 98 98 { 99 99 // fhourangle is the hour angle [degrees] -
trunk/MagicSoft/Mars/manalysis/MCT1PointingCorrCalc.h
r2088 r2206 32 32 const char *name=NULL, const char *title=NULL); 33 33 34 Bool_t PreProcess(MParList *pList);35 Bool_t Process();34 Int_t PreProcess(MParList *pList); 35 Int_t Process(); 36 36 37 37 ClassDef(MCT1PointingCorrCalc, 0) // Task to do the CT1 pointing correction for Mkn421 2001 data -
trunk/MagicSoft/Mars/manalysis/MCT1SupercutsCalc.cc
r2173 r2206 149 149 // -------------------------------------------------------------------------- 150 150 // 151 Bool_t MCT1SupercutsCalc::PreProcess(MParList *pList)151 Int_t MCT1SupercutsCalc::PreProcess(MParList *pList) 152 152 { 153 153 fHil = (MHillas*)pList->FindObject(fHilName, "MHillas"); … … 235 235 // 0.75 otherwise 236 236 // 237 Bool_t MCT1SupercutsCalc::Process()237 Int_t MCT1SupercutsCalc::Process() 238 238 { 239 239 const Double_t kNomLogSize = 4.1; -
trunk/MagicSoft/Mars/manalysis/MCT1SupercutsCalc.h
r2038 r2206 50 50 void InitParams(); 51 51 52 Bool_t PreProcess(MParList *pList);53 Bool_t Process();52 Int_t PreProcess(MParList *pList); 53 Int_t Process(); 54 54 55 55 public: -
trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc
r2178 r2206 385 385 } 386 386 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 // 397 Bool_t MCerPhotEvt::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const 388 398 { 389 399 MCerPhotPix *pix = GetPixById(idx); 390 400 if (!pix || !pix->IsPixelUsed()) 391 401 return kFALSE; 402 403 const Double_t ratio = cam.GetPixRatio(idx); 392 404 393 405 switch (type) … … 401 413 val = pix->GetNumPhotons()*TMath::Sqrt(ratio)/pix->GetErrorPhot(); 402 414 return kTRUE; 415 case 3: 416 val = pix->GetNumPhotons(); 417 break; 418 case 4: 419 val = pix->GetErrorPhot(); 420 break; 403 421 default: 404 422 val = pix->GetNumPhotons()*ratio; -
trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h
r2178 r2206 64 64 void Clear(Option_t *opt=NULL) { Reset(); } 65 65 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; 67 67 void DrawPixelContent(Int_t num) const 68 68 { -
trunk/MagicSoft/Mars/manalysis/MCompProbCalc.cc
r2173 r2206 81 81 // - MHadronness 82 82 // 83 Bool_t MCompProbCalc::PreProcess(MParList *plist)83 Int_t MCompProbCalc::PreProcess(MParList *plist) 84 84 { 85 85 MHCompProb *p = (MHCompProb*)plist->FindObject("MHCompProb"); … … 140 140 // - This is the hadroness stored in the MHadronness container 141 141 // 142 Bool_t MCompProbCalc::Process()142 Int_t MCompProbCalc::Process() 143 143 { 144 144 Double_t p = 1; -
trunk/MagicSoft/Mars/manalysis/MCompProbCalc.h
r1574 r2206 25 25 ~MCompProbCalc(); 26 26 27 Bool_t PreProcess(MParList *plist);28 Bool_t Process();27 Int_t PreProcess(MParList *plist); 28 Int_t Process(); 29 29 30 30 ClassDef(MCompProbCalc, 1) // Task to calculate composite probabilities -
trunk/MagicSoft/Mars/manalysis/MCurrents.h
r2183 r2206 37 37 void Print(Option_t *opt=NULL) const; 38 38 39 Bool_t GetPixelContent( Float_t &val, Int_t idx, Float_t ratio=1, Int_t type=0) const39 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const 40 40 { 41 41 val = (*this)[idx]; -
trunk/MagicSoft/Mars/manalysis/MEnergyEstParam.cc
r2179 r2206 133 133 // Check for all necessary parameter containers. 134 134 // 135 Bool_t MEnergyEstParam::PreProcess(MParList *plist)135 Int_t MEnergyEstParam::PreProcess(MParList *plist) 136 136 { 137 137 if (!fMatrix) … … 299 299 // (see code) 300 300 // 301 Bool_t MEnergyEstParam::Process()301 Int_t MEnergyEstParam::Process() 302 302 { 303 303 const Double_t theta = fMatrix ? GetVal(0) : fMc->GetTelescopeTheta(); -
trunk/MagicSoft/Mars/manalysis/MEnergyEstParam.h
r2173 r2206 40 40 Double_t GetVal(Int_t i) const; 41 41 42 Int_t PreProcess(MParList *plist); 43 Int_t Process(); 42 44 43 45 public: 44 46 MEnergyEstParam(const char *hil="MHillas", const char *name=NULL, const char *title=NULL); 45 47 ~MEnergyEstParam(); 46 47 Bool_t PreProcess(MParList *plist);48 Bool_t Process();49 48 50 49 void Add(const TString hillas, const TString energy="MEnergyEst"); -
trunk/MagicSoft/Mars/manalysis/MEnergyEstimate.cc
r2173 r2206 60 60 } 61 61 62 Bool_t MEnergyEstimate::PreProcess(MParList *plist)62 Int_t MEnergyEstimate::PreProcess(MParList *plist) 63 63 { 64 64 fHillas = (MHillas*)plist->FindObject("MHillas"); … … 83 83 } 84 84 85 Bool_t MEnergyEstimate::Process()85 Int_t MEnergyEstimate::Process() 86 86 { 87 87 //fEnergy->SetEnergy(fHillas->GetSize()); -
trunk/MagicSoft/Mars/manalysis/MEnergyEstimate.h
r1664 r2206 20 20 MEnergyEstimate(const char *name=NULL, const char *title=NULL); 21 21 22 Bool_t PreProcess(MParList *plist);23 Bool_t Process();22 Int_t PreProcess(MParList *plist); 23 Int_t Process(); 24 24 25 25 ClassDef(MEnergyEstimate, 0) // Task to copy the MC energy (preliminary) -
trunk/MagicSoft/Mars/manalysis/MFiltercutsCalc.cc
r2173 r2206 62 62 fList = new MFilterList; 63 63 fList->SetOwner(); 64 fList->SetBit(kMustCleanup); 65 66 gROOT->GetListOfCleanups()->Add(fList); 64 67 } 65 68 … … 80 83 { 81 84 f->SetName(f->GetRule()); 85 f->SetBit(kMustCleanup); 82 86 fList->AddToList(f); 83 87 } … … 143 147 // there. PreProcess the filter list. 144 148 // 145 Bool_t MFiltercutsCalc::PreProcess(MParList *pList)149 Int_t MFiltercutsCalc::PreProcess(MParList *pList) 146 150 { 147 151 if (!fList->PreProcess(pList)) … … 160 164 // 0.25, otherwise to 0.75. 161 165 // 162 Bool_t MFiltercutsCalc::Process()166 Int_t MFiltercutsCalc::Process() 163 167 { 164 168 if (!fList->Process()) -
trunk/MagicSoft/Mars/manalysis/MFiltercutsCalc.h
r2124 r2206 24 24 TString fHadronnessName; // name of container to store hadronness 25 25 26 Bool_t PreProcess(MParList *pList);27 Bool_t Process();26 Int_t PreProcess(MParList *pList); 27 Int_t Process(); 28 28 29 29 void AddToList(MFilter *f); -
trunk/MagicSoft/Mars/manalysis/MMatrixLoop.cc
r1525 r2206 56 56 // been accessed. 57 57 // 58 Bool_t MMatrixLoop::Process()58 Int_t MMatrixLoop::Process() 59 59 { 60 60 return fMatrix->SetNumRow(fNumRow++); -
trunk/MagicSoft/Mars/manalysis/MMatrixLoop.h
r1664 r2206 21 21 MMatrixLoop(MHMatrix *mat, const char *name=NULL, const char *title=NULL); 22 22 23 Bool_t PreProcess(MParList *plist)23 Int_t PreProcess(MParList *plist) 24 24 { 25 25 fNumRow = 0; … … 28 28 } 29 29 30 Bool_t Process();30 Int_t Process(); 31 31 32 32 ClassDef(MMatrixLoop, 0) // Task 'reading' events from a MHMatrix -
trunk/MagicSoft/Mars/manalysis/MMcPedestalCopy.cc
r2173 r2206 92 92 // If the runtype check fails the task is removed from the task list. 93 93 // 94 Bool_t MMcPedestalCopy::PreProcess(MParList *pList)94 Int_t MMcPedestalCopy::PreProcess(MParList *pList) 95 95 { 96 96 if (!CheckRunType(pList)) -
trunk/MagicSoft/Mars/manalysis/MMcPedestalCopy.h
r1180 r2206 17 17 Bool_t CheckRunType(MParList *pList) const; 18 18 19 Int_t PreProcess(MParList *pList); 20 Bool_t ReInit(MParList *pList); 21 19 22 public: 20 23 MMcPedestalCopy(const char *name=NULL, const char *title=NULL); 21 22 Bool_t PreProcess(MParList *pList);23 24 virtual Bool_t ReInit(MParList *pList);25 24 26 25 ClassDef(MMcPedestalCopy, 0) // Task which copies the pedestals from the MC into the standard container -
trunk/MagicSoft/Mars/manalysis/MMcPedestalNSBAdd.cc
r2178 r2206 116 116 // - try to find a MMcRunHeader, too 117 117 // 118 Bool_t MMcPedestalNSBAdd::PreProcess(MParList *pList)118 Int_t MMcPedestalNSBAdd::PreProcess(MParList *pList) 119 119 { 120 120 if (!CheckRunType(pList)) -
trunk/MagicSoft/Mars/manalysis/MMcPedestalNSBAdd.h
r1180 r2206 21 21 Bool_t CheckRunType(MParList *pList) const; 22 22 Float_t GetDnsb(MParList *pList) const; 23 Int_t PreProcess(MParList *pList); 24 Bool_t ReInit(MParList *pList); 25 23 26 24 27 public: … … 26 29 const char *name=NULL, const char *title=NULL); 27 30 28 Bool_t PreProcess(MParList *pList);29 30 virtual Bool_t ReInit(MParList *pList);31 32 31 ClassDef(MMcPedestalNSBAdd, 0) // Task which adds the NSB fluctuations to the pedestals rms 33 32 }; -
trunk/MagicSoft/Mars/manalysis/MMcTriggerLvl2Calc.cc
r2173 r2206 71 71 // 72 72 // 73 Bool_t MMcTriggerLvl2Calc::PreProcess (MParList *pList)73 Int_t MMcTriggerLvl2Calc::PreProcess (MParList *pList) 74 74 { 75 75 // connect the raw data with this task … … 130 130 // 131 131 // 132 Bool_t MMcTriggerLvl2Calc::Process()132 Int_t MMcTriggerLvl2Calc::Process() 133 133 { 134 134 //const Float_t energy = fMcEvt->GetEnergy(); … … 153 153 // !to be fixed: create an histogram class! 154 154 // 155 Bool_t MMcTriggerLvl2Calc::PostProcess()155 Int_t MMcTriggerLvl2Calc::PostProcess() 156 156 { 157 157 -
trunk/MagicSoft/Mars/manalysis/MMcTriggerLvl2Calc.h
r2006 r2206 28 28 MHMcTriggerLvl2 *fMHMcTriggerLvl2; 29 29 30 Int_t PreProcess(MParList *pList); 31 Int_t Process(); 32 Int_t PostProcess(); 33 30 34 public: 31 35 MMcTriggerLvl2Calc(const char *name=NULL, const char *title=NULL); 32 33 Bool_t PreProcess(MParList *pList);34 Bool_t Process();35 Bool_t PostProcess();36 36 37 37 ClassDef(MMcTriggerLvl2Calc, 0) // Task to calculate the MMcTriggerLvl2 Parameters -
trunk/MagicSoft/Mars/manalysis/MMultiDimDistCalc.cc
r2173 r2206 105 105 // number of columns (with the same meaning). 106 106 // 107 Bool_t MMultiDimDistCalc::PreProcess(MParList *plist)107 Int_t MMultiDimDistCalc::PreProcess(MParList *plist) 108 108 { 109 109 fMGammas = (MHMatrix*)plist->FindObject("MatrixGammas", "MHMatrix"); … … 172 172 // H = exp(-dh/dg); 173 173 // 174 Bool_t MMultiDimDistCalc::Process()174 Int_t MMultiDimDistCalc::Process() 175 175 { 176 176 // first copy the data from the data array to a vector event -
trunk/MagicSoft/Mars/manalysis/MMultiDimDistCalc.h
r1917 r2206 27 27 28 28 void StreamPrimitive(ofstream &out) const; 29 Int_t PreProcess(MParList *plist); 30 Int_t Process(); 29 31 30 32 public: … … 38 40 void SetUseKernelMethod(Bool_t k=kTRUE) { fUseKernel = k; } 39 41 40 Bool_t PreProcess(MParList *plist);41 Bool_t Process();42 43 42 ClassDef(MMultiDimDistCalc, 1) // Task to calculate nearest neighbor-/kernel-hadronness 44 43 }; -
trunk/MagicSoft/Mars/manalysis/MPadding.cc
r2173 r2206 230 230 // if not create one and add them to the list 231 231 // 232 Bool_t MPadding::PreProcess(MParList *pList)232 Int_t MPadding::PreProcess(MParList *pList) 233 233 { 234 234 fMcEvt = (MMcEvt*)pList->FindObject("MMcEvt"); … … 407 407 // Do the padding (mySig ==> otherSig) 408 408 // 409 Bool_t MPadding::Padding(const Double_t quadraticDiff, const Double_t theta)409 Int_t MPadding::Padding(const Double_t quadraticDiff, const Double_t theta) 410 410 { 411 411 const UInt_t npix = fEvt->GetNumPixels(); … … 469 469 // 3) pad event 470 470 // 471 Bool_t MPadding::Process()471 Int_t MPadding::Process() 472 472 { 473 473 const Double_t theta = kRad2Deg*fMcEvt->GetTelescopeTheta(); -
trunk/MagicSoft/Mars/manalysis/MPadding.h
r2062 r2206 43 43 Bool_t Padding(const Double_t quadDiff, const Double_t theta); 44 44 45 Int_t PreProcess(MParList *pList); 46 Int_t Process(); 47 Int_t PostProcess(); 48 45 49 public: 46 50 MPadding(const char *name=NULL, const char *title=NULL); 47 51 ~MPadding(); 48 52 49 Bool_t PreProcess(MParList *pList);50 Bool_t Process();51 Bool_t PostProcess();52 53 53 void SetRunType(Int_t runtype) { fRunType = runtype; } 54 54 void SetGroup(Int_t group) { fGroup = group; } -
trunk/MagicSoft/Mars/manalysis/MPedCalcPedRun.cc
r2173 r2206 64 64 } 65 65 66 Bool_t MPedCalcPedRun::PreProcess( MParList *pList )66 Int_t MPedCalcPedRun::PreProcess( MParList *pList ) 67 67 { 68 68 fRawEvt = (MRawEvtData*)pList->FindObject("MRawEvtData"); … … 83 83 84 84 85 Bool_t MPedCalcPedRun::Process()85 Int_t MPedCalcPedRun::Process() 86 86 { 87 87 MRawEvtPixelIter pixel(fRawEvt); -
trunk/MagicSoft/Mars/manalysis/MPedCalcPedRun.h
r1014 r2206 29 29 Float_t CalcHiGainRmsErr(Float_t higainrms) const; 30 30 31 Int_t PreProcess(MParList *pList); 32 Int_t Process(); 33 31 34 public: 32 35 33 36 MPedCalcPedRun(const char *name=NULL, const char *title=NULL); 34 35 Bool_t PreProcess(MParList *pList);36 Bool_t Process();37 37 38 38 ClassDef(MPedCalcPedRun, 0) // Task to calculate pedestals from pedestal runs raw data -
trunk/MagicSoft/Mars/manalysis/MPedestalCalc.cc
r1629 r2206 72 72 } 73 73 74 Bool_t MPedestalCalc::PreProcess(MParList *pList)74 Int_t MPedestalCalc::PreProcess(MParList *pList) 75 75 { 76 76 if (fHists) … … 123 123 // Then the current event is filled into the histograms. 124 124 // 125 Bool_t MPedestalCalc::Process()125 Int_t MPedestalCalc::Process() 126 126 { 127 127 // -
trunk/MagicSoft/Mars/manalysis/MPedestalCalc.h
r1630 r2206 41 41 void Check(Int_t i); 42 42 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(); 46 46 47 47 public: -
trunk/MagicSoft/Mars/manalysis/MPedestalCam.cc
r2180 r2206 182 182 } 183 183 184 Bool_t MPedestalCam::GetPixelContent( Float_t &val, Int_t idx, Float_t ratio, Int_t type) const184 Bool_t MPedestalCam::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const 185 185 { 186 val = (*this)[idx].GetMean()* ratio;186 val = (*this)[idx].GetMean()*cam.GetPixRatio(idx); 187 187 return kTRUE; 188 188 } -
trunk/MagicSoft/Mars/manalysis/MPedestalCam.h
r2178 r2206 35 35 void Print(Option_t *o="") const; 36 36 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; 38 38 void DrawPixelContent(Int_t num) const 39 39 { -
trunk/MagicSoft/Mars/manalysis/MPointingCorr.cc
r1888 r2206 64 64 // 65 65 // 66 Bool_t MPointingCorr::PreProcess(MParList *pList)66 Int_t MPointingCorr::PreProcess(MParList *pList) 67 67 { 68 68 MGeomCam *geom = (MGeomCam*)pList->FindObject("MGeomCam"); … … 107 107 // the parametrization is for Mkn421 2001 data (Daniel Kranich) 108 108 // 109 Bool_t MPointingCorr::Process()109 Int_t MPointingCorr::Process() 110 110 { 111 111 // fhourangle is the hour angle [degrees] … … 133 133 return kTRUE; 134 134 } 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 28 28 Float_t fMm2Deg; 29 29 30 Int_t PreProcess(MParList *pList); 31 Int_t Process(); 32 30 33 public: 31 34 MPointingCorr(const char *name=NULL, const char *title=NULL, 32 35 const char *srcname="MSrcPosCam"); 33 34 Bool_t PreProcess(MParList *pList);35 Bool_t Process();36 Bool_t PostProcess();37 36 38 37 ClassDef(MPointingCorr, 0) // Task to do the pointing correction … … 40 39 41 40 #endif 42 43 44 45 46 47 48 49 50 51 52 -
trunk/MagicSoft/Mars/mbase/MClone.cc
r2173 r2206 112 112 // the name of it was given in the constructor. 113 113 // 114 Bool_t MClone::PreProcess(MParList *pList)114 Int_t MClone::PreProcess(MParList *pList) 115 115 { 116 116 // … … 158 158 // again. 159 159 // 160 Bool_t MClone::Process()160 Int_t MClone::Process() 161 161 { 162 162 // -
trunk/MagicSoft/Mars/mbase/MClone.h
r1540 r2206 27 27 ~MClone(); 28 28 29 Bool_t PreProcess(MParList *pList);30 Bool_t Process();29 Int_t PreProcess(MParList *pList); 30 Int_t Process(); 31 31 32 32 TObject *GetClone() const { return fClone; } -
trunk/MagicSoft/Mars/mbase/MContinue.cc
r2173 r2206 112 112 // before this instance to the tasklist and preprocesses the filter. 113 113 // 114 Bool_t MContinue::PreProcess(MParList *list)114 Int_t MContinue::PreProcess(MParList *list) 115 115 { 116 116 if (!GetFilter()) … … 147 147 } 148 148 149 void MContinue::SetDisplay(MStatusDisplay *d) 150 { 151 if (GetFilter()) 152 GetFilter()->SetDisplay(d); 153 154 MTask::SetDisplay(d); 155 } 156 157 void MContinue::SetLogStream(MLog *lg) 158 { 159 if (GetFilter()) 160 GetFilter()->SetLogStream(lg); 161 162 MTask::SetLogStream(lg); 163 } 164 149 165 // -------------------------------------------------------------------------- 150 166 // … … 152 168 // from the tasklist. 153 169 // 154 Bool_t MContinue::PostProcess()170 Int_t MContinue::PostProcess() 155 171 { 156 172 if (!TestBit(kFilterIsPrivate)) -
trunk/MagicSoft/Mars/mbase/MContinue.h
r1938 r2206 15 15 #endif 16 16 17 class MLog; 17 18 class MFilter; 18 19 class MTaskList; 20 class MStatusDisplay; 19 21 20 22 class MContinue : public MTask … … 23 25 MTaskList *fTaskList; //! pointer to the present tasklist 24 26 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(); 28 30 29 31 enum { kIsOwner = BIT(14), kFilterIsPrivate = BIT(15) }; … … 37 39 Bool_t IsInverted() const; 38 40 41 void SetDisplay(MStatusDisplay *d); 42 void SetLogStream(MLog *lg); 43 39 44 ClassDef(MContinue, 1) //Task returning kCONTINUE 40 45 }; -
trunk/MagicSoft/Mars/mbase/MEvtLoop.cc
r2173 r2206 109 109 fName = name; 110 110 111 gROOT->GetListOfCleanups()->Add(this); // To remove fDisplay 112 111 113 *fLog << inf << underline << "Instantiated MEvtLoop (" << name << "), using ROOT v" << ROOTVER << endl; 112 114 } … … 122 124 } 123 125 126 void MEvtLoop::SetParList(MParList *p) 127 { 128 if (!p) 129 return; 130 131 p->SetBit(kMustCleanup); 132 fParList = p; 133 } 134 124 135 // -------------------------------------------------------------------------- 125 136 // … … 152 163 } 153 164 165 void MEvtLoop::SetProgressBar(TGProgressBar *bar) 166 { 167 fProgress = bar; 168 fProgress->SetBit(kMustCleanup); 169 } 170 154 171 #ifdef __MARS__ 155 172 // -------------------------------------------------------------------------- … … 160 177 void MEvtLoop::SetProgressBar(MProgressBar *bar) 161 178 { 162 fProgress = bar->GetBar();179 SetProgressBar(bar->GetBar()); 163 180 } 164 181 #endif … … 200 217 // Check whether display is still existing 201 218 // 202 if (fDisplay && !gROOT->GetListOfSpecials()->FindObject(fDisplay))203 fDisplay = NULL;204 219 if (fDisplay) 205 220 { … … 238 253 Bool_t MEvtLoop::ProcessGuiEvents(Int_t num) 239 254 { 240 if (!fProgress )255 if (!fProgress || gROOT->IsBatch()) 241 256 return kTRUE; 242 257 … … 255 270 fDisplay->ClearStatus(); 256 271 break; 257 case MStatusDisplay::kFileExit:258 fParList->SetDisplay(NULL);259 delete fDisplay;260 SetDisplay(NULL);261 fProgress = NULL;262 gSystem->ProcessEvents();263 return kTRUE;264 272 default: 265 273 *fLog << warn << "MEvtloop: fDisplay->ChecStatus() has returned unknown status #" << fDisplay->CheckStatus() << "... cleared." << endl; … … 348 356 Int_t entries = INT_MAX; 349 357 350 if (fProgress )358 if (fProgress && !gROOT->IsBatch()) 351 359 { 352 360 fProgress->Reset(); … … 409 417 clock.Stop(); 410 418 411 if (fProgress )419 if (fProgress && !gROOT->IsBatch()) 412 420 { 413 421 fProgress->SetPosition(maxcnt>0 ? TMath::Min(maxcnt, entries) : entries); … … 912 920 return kTRUE; 913 921 } 922 923 void 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 28 28 MTaskList *fTaskList; //! 29 29 30 TGProgressBar 30 TGProgressBar *fProgress; //! 31 31 32 32 enum { kIsOwner = BIT(14) }; … … 43 43 virtual ~MEvtLoop(); 44 44 45 void SetParList(MParList *p) { fParList = p; }46 MParList *GetParList() const 47 MTaskList *GetTaskList() const 45 void SetParList(MParList *p); 46 MParList *GetParList() const { return fParList; } 47 MTaskList *GetTaskList() const { return fTaskList; } 48 48 49 49 MTask *FindTask(const char *name) const; … … 54 54 void SetOwner(Bool_t enable=kTRUE); 55 55 56 void SetProgressBar(TGProgressBar *bar) { fProgress = bar; }56 void SetProgressBar(TGProgressBar *bar); 57 57 #ifdef __MARS__ 58 58 void SetProgressBar(MProgressBar *bar); … … 77 77 Bool_t WriteEnv(TEnv &env, TString prefix="", Bool_t print=kFALSE) const; 78 78 79 void RecursiveRemove(TObject *obj); 80 79 81 ClassDef(MEvtLoop, 1) // Class to execute the tasks in a tasklist 80 82 }; 81 83 84 // FIXME: Move as (persistent) static data member to MParContainer 82 85 R__EXTERN TList *gListOfPrimitives; // instantiation in MEvtLoop 83 86 -
trunk/MagicSoft/Mars/mbase/MGTask.cc
r2173 r2206 70 70 // MTask::CallPreProcess 71 71 // 72 Bool_t MGTask::CallPreProcess(MParList *plist)72 Int_t MGTask::CallPreProcess(MParList *plist) 73 73 { 74 74 HideGui(); … … 82 82 // MTask::CallPostProcess 83 83 // 84 Bool_t MGTask::CallPostProcess()84 Int_t MGTask::CallPostProcess() 85 85 { 86 86 ShowGui(); -
trunk/MagicSoft/Mars/mbase/MGTask.h
r1664 r2206 38 38 virtual ~MGTask(); 39 39 40 Bool_t CallPreProcess(MParList *plist);41 Bool_t CallPostProcess();40 Int_t CallPreProcess(MParList *plist); 41 Int_t CallPostProcess(); 42 42 43 43 virtual Bool_t ProcessMessage(Int_t msg, Int_t submsg, Long_t param1, Long_t param2); -
trunk/MagicSoft/Mars/mbase/MPrint.cc
r2173 r2206 107 107 // the name of it was given in the constructor. 108 108 // 109 Bool_t MPrint::PreProcess(MParList *pList)109 Int_t MPrint::PreProcess(MParList *pList) 110 110 { 111 111 // … … 142 142 // Calls overloaded TObject::Print 143 143 // 144 Bool_t MPrint::Process()144 Int_t MPrint::Process() 145 145 { 146 146 fObject->Print(fOption); -
trunk/MagicSoft/Mars/mbase/MPrint.h
r1542 r2206 26 26 void EnableSkip(Bool_t skip=kTRUE) { skip ? SetBit(kSkip) : ResetBit(kSkip); } 27 27 28 Bool_t PreProcess(MParList *pList);29 Bool_t Process();28 Int_t PreProcess(MParList *pList); 29 Int_t Process(); 30 30 31 31 ClassDef(MPrint, 0) // Task to call Print() function -
trunk/MagicSoft/Mars/mbase/MTask.cc
r2173 r2206 165 165 // Sets the preprocessed flag dependend on the return value of PreProcess. 166 166 // 167 Bool_t MTask::CallPreProcess(MParList *plist)167 Int_t MTask::CallPreProcess(MParList *plist) 168 168 { 169 169 fNumExecutions = 0; … … 199 199 // If Process is executed, the execution counter is increased. 200 200 // 201 Bool_t MTask::CallProcess()201 Int_t MTask::CallProcess() 202 202 { 203 203 // … … 221 221 // resets this flag. 222 222 // 223 Bool_t MTask::CallPostProcess()223 Int_t MTask::CallPostProcess() 224 224 { 225 225 if (!fIsPreprocessed) … … 261 261 // the virtual implementation returns kTRUE 262 262 // 263 Bool_t MTask::PreProcess(MParList *pList)263 Int_t MTask::PreProcess(MParList *pList) 264 264 { 265 265 return kTRUE; … … 272 272 // the virtual implementation returns kTRUE 273 273 // 274 Bool_t MTask::Process()274 Int_t MTask::Process() 275 275 { 276 276 return kTRUE; … … 283 283 // the virtual implementation returns kTRUE 284 284 // 285 Bool_t MTask::PostProcess()285 Int_t MTask::PostProcess() 286 286 { 287 287 return kTRUE; -
trunk/MagicSoft/Mars/mbase/MTask.h
r2117 r2206 29 29 UInt_t fNumExecutions; //! Number of Excutions 30 30 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(); 34 34 35 35 protected: … … 75 75 virtual Bool_t ReInit(MParList *pList); 76 76 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(); 80 80 81 81 const TList *GetListOfBranches() const { return fListOfBranches; } -
trunk/MagicSoft/Mars/mbase/MTaskInteractive.cc
r2178 r2206 75 75 } 76 76 77 inline Bool_t MTaskInteractive::Return(Int_t no, void *params)77 inline Int_t MTaskInteractive::Return(Int_t no, void *params) 78 78 { 79 79 // Static function called when SetFCN is called in interactive mode -
trunk/MagicSoft/Mars/mbase/MTaskInteractive.h
r2156 r2206 23 23 TMethodCall *fCall[3]; 24 24 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)(); 28 28 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; } 32 32 33 Bool_t Return(Int_t no, void *param=NULL);33 Int_t Return(Int_t no, void *param=NULL); 34 34 Bool_t Set(void *fcn, Int_t no, const char *params); 35 35 void Free(Int_t no); … … 40 40 41 41 // 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); } 45 45 46 46 // This is for usage in CINT -
trunk/MagicSoft/Mars/mbase/MTaskList.cc
r2178 r2206 92 92 93 93 fTasks = new TList; 94 95 gROOT->GetListOfCleanups()->Add(fTasks); 96 gROOT->GetListOfCleanups()->Add(&fTasksProcess); 97 fTasks->SetBit(kMustCleanup); 98 fTasksProcess.SetBit(kMustCleanup); 94 99 } 95 100 … … 212 217 *fLog << inf << "Adding " << task->GetName() << " to " << GetName() << " for " << type << "... " << flush; 213 218 task->SetStreamId(type); 219 task->SetBit(kMustCleanup); 214 220 fTasks->AddBefore((TObject*)where, task); 215 221 *fLog << "Done." << endl; … … 232 238 *fLog << inf << "Adding " << task->GetName() << " to " << GetName() << " for " << type << "... " << flush; 233 239 task->SetStreamId(type); 240 task->SetBit(kMustCleanup); 234 241 fTasks->AddAfter((TObject*)where, task); 235 242 *fLog << "Done." << endl; … … 252 259 *fLog << inf << "Adding " << task->GetName() << " to " << GetName() << " for " << type << "... " << flush; 253 260 task->SetStreamId(type); 261 task->SetBit(kMustCleanup); 254 262 fTasks->Add(task); 255 263 *fLog << "Done." << endl; … … 331 339 // doing no Processing are not Processed. 332 340 // 333 Bool_t MTaskList::PreProcess(MParList *pList)341 Int_t MTaskList::PreProcess(MParList *pList) 334 342 { 335 343 *fLog << all << "Preprocessing... " << flush; … … 399 407 // do the event execution of all tasks in the task-list 400 408 // 401 Bool_t MTaskList::Process()409 Int_t MTaskList::Process() 402 410 { 403 411 // … … 501 509 // only tasks which have successfully been preprocessed are postprocessed. 502 510 // 503 Bool_t MTaskList::PostProcess()511 Int_t MTaskList::PostProcess() 504 512 { 505 513 *fLog << all << "Postprocessing... " << flush; -
trunk/MagicSoft/Mars/mbase/MTaskList.h
r2098 r2206 63 63 Bool_t ReInit(MParList *pList=NULL); 64 64 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(); 68 68 69 69 void Print(Option_t *opt = "") const; -
trunk/MagicSoft/Mars/mdata/MDataArray.cc
r2173 r2206 57 57 fName = name ? name : gsDefName.Data(); 58 58 fTitle = title ? title : gsDefTitle.Data(); 59 60 gROOT->GetListOfCleanups()->Add(&fList); 61 fList.SetBit(kMustCleanup); 59 62 } 60 63 … … 77 80 void MDataArray::AddEntry(MData *data) 78 81 { 82 data->SetBit(kMustCleanup); 79 83 fList.Add(data); 80 84 } -
trunk/MagicSoft/Mars/mdata/MDataList.cc
r2173 r2206 45 45 { 46 46 fSign = kENone; 47 48 gROOT->GetListOfCleanups()->Add(&fMembers); 49 fMembers.SetBit(kMustCleanup); 47 50 } 48 51 … … 76 79 fSign = kENone; 77 80 } 81 82 gROOT->GetListOfCleanups()->Add(&fMembers); 83 fMembers.SetBit(kMustCleanup); 78 84 } 79 85 … … 179 185 } 180 186 187 member->SetBit(kMustCleanup); 181 188 fMembers.Add(member); 182 189 -
trunk/MagicSoft/Mars/mdatacheck/DataCheckLinkDef.h
r1018 r2206 5 5 #pragma link off all functions; 6 6 7 #pragma link C++ class MDumpEvtHeader+;8 9 7 #endif -
trunk/MagicSoft/Mars/mdatacheck/MDumpEvtHeader.cc
r2173 r2206 60 60 // data. 61 61 // 62 Bool_t MDumpEvtHeader::PreProcess (MParList *pList)62 Int_t MDumpEvtHeader::PreProcess (MParList *pList) 63 63 { 64 64 fRawEvtHeader = (MRawEvtHeader*)pList->FindObject("MRawEvtHeader"); … … 84 84 // pixel ID's of all pixels in this event. 85 85 // 86 Bool_t MDumpEvtHeader::Process()86 Int_t MDumpEvtHeader::Process() 87 87 { 88 88 fRawEvtHeader->Print(); -
trunk/MagicSoft/Mars/mdatacheck/MDumpEvtHeader.h
r1013 r2206 16 16 MRawEvtData *fRawEvtData; 17 17 18 Int_t PreProcess(MParList *pList); 19 Int_t Process(); 20 18 21 public: 19 22 MDumpEvtHeader () : fRawEvtHeader(NULL) { }; 20 23 21 Bool_t PreProcess(MParList *pList);22 Bool_t Process();23 24 24 ClassDef(MDumpEvtHeader, 0) // Class to dump the pixel ids of a raw evt to the screen 25 25 -
trunk/MagicSoft/Mars/mdatacheck/Makefile
r1052 r2206 28 28 .SUFFIXES: .c .cc .cxx .h .hxx .o 29 29 30 SRCFILES = MDumpEvtHeader.cc \ 31 MGDisplayAdc.cc 30 SRCFILES = MGDisplayAdc.cc 32 31 33 32 SRCS = $(SRCFILES) -
trunk/MagicSoft/Mars/mfileio/MCT1ReadAscii.cc
r2173 r2206 156 156 // Initialize the size of the MPedestalCam container to 127 pixels (CT1 camera) 157 157 // 158 Bool_t MCT1ReadAscii::PreProcess(MParList *pList)158 Int_t MCT1ReadAscii::PreProcess(MParList *pList) 159 159 { 160 160 // … … 264 264 // there is now next file stop the eventloop. 265 265 // 266 Bool_t MCT1ReadAscii::Process()266 Int_t MCT1ReadAscii::Process() 267 267 { 268 268 // -
trunk/MagicSoft/Mars/mfileio/MCT1ReadAscii.h
r1880 r2206 23 23 void ReadData(); 24 24 25 Int_t PreProcess(MParList *pList); 26 Int_t Process(); 27 25 28 public: 26 29 MCT1ReadAscii(const char *filename=NULL, … … 32 35 Int_t AddFile(const char *fname, Int_t dummy=-1); 33 36 34 Bool_t PreProcess(MParList *pList);35 Bool_t Process();36 37 37 ClassDef(MCT1ReadAscii, 0) // Reads the CT1 data file 38 38 }; -
trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc
r2173 r2206 730 730 // Initialize the size of the MPedestalCam container to 127 pixels (CT1 camera) 731 731 // 732 Bool_t MCT1ReadPreProc::PreProcess(MParList *pList)732 Int_t MCT1ReadPreProc::PreProcess(MParList *pList) 733 733 { 734 734 fParList = pList; … … 1091 1091 // there is now next file stop the eventloop. 1092 1092 // 1093 Bool_t MCT1ReadPreProc::Process()1093 Int_t MCT1ReadPreProc::Process() 1094 1094 { 1095 1095 // … … 1152 1152 } 1153 1153 1154 Bool_t MCT1ReadPreProc::PostProcess()1154 Int_t MCT1ReadPreProc::PostProcess() 1155 1155 { 1156 1156 *fLog << all; -
trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.h
r2152 r2206 79 79 Double_t DiscreteTheta(Double_t theta); 80 80 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(); 84 84 85 85 Bool_t Rewind(); -
trunk/MagicSoft/Mars/mfileio/MReadCurrents.cc
r2173 r2206 151 151 // Initialize the size of the MPedestalCam container to 127 pixels (CT1 camera) 152 152 // 153 Bool_t MReadCurrents::PreProcess(MParList *pList)153 Int_t MReadCurrents::PreProcess(MParList *pList) 154 154 { 155 155 // … … 190 190 // there is now next file stop the eventloop. 191 191 // 192 Bool_t MReadCurrents::Process()192 Int_t MReadCurrents::Process() 193 193 { 194 194 // -
trunk/MagicSoft/Mars/mfileio/MReadCurrents.h
r2148 r2206 29 29 Int_t AddFile(const char *fname, Int_t dummy=-1); 30 30 31 Bool_t PreProcess(MParList *pList);32 Bool_t Process();31 Int_t PreProcess(MParList *pList); 32 Int_t Process(); 33 33 34 34 ClassDef(MReadCurrents, 0) // Reads a Central Control currents file -
trunk/MagicSoft/Mars/mfileio/MReadMarsFile.cc
r2173 r2206 199 199 // see MReadTree::PreProcess for more information 200 200 // 201 Bool_t MReadMarsFile::PreProcess(MParList *pList)201 Int_t MReadMarsFile::PreProcess(MParList *pList) 202 202 { 203 203 fParList = pList; -
trunk/MagicSoft/Mars/mfileio/MReadMarsFile.h
r2117 r2206 17 17 Bool_t Notify(); 18 18 19 Bool_t PreProcess(MParList *pList);19 Int_t PreProcess(MParList *pList); 20 20 21 21 public: -
trunk/MagicSoft/Mars/mfileio/MReadRflFile.cc
r2173 r2206 42 42 #include "MRflEvtHeader.h" 43 43 #include "MRflRunHeader.h" 44 #include "MRflSinglePhoton.h" 44 45 45 46 #include "MLog.h" … … 219 220 } 220 221 221 Bool_t MReadRflFile::Process()222 Int_t MReadRflFile::Process() 222 223 { 223 224 for (;;) … … 248 249 } 249 250 250 Bool_t MReadRflFile::PreProcess(MParList *plist)251 Int_t MReadRflFile::PreProcess(MParList *plist) 251 252 { 252 253 fEvtData=(MRflEvtData*)plist->FindCreateObj("MRflEvtData"); -
trunk/MagicSoft/Mars/mfileio/MReadRflFile.h
r2136 r2206 38 38 Bool_t OpenNextFile(); 39 39 40 Bool_t PreProcess(MParList *pList);41 Bool_t Process();40 Int_t PreProcess(MParList *pList); 41 Int_t Process(); 42 42 43 43 public: -
trunk/MagicSoft/Mars/mfileio/MReadTree.cc
r2173 r2206 572 572 // MReadTree::PreProcess 573 573 // 574 Bool_t MReadTree::PreProcess(MParList *pList)574 Int_t MReadTree::PreProcess(MParList *pList) 575 575 { 576 576 // … … 755 755 #include "MRawEvtData.h" 756 756 #endif 757 Bool_t MReadTree::Process()757 Int_t MReadTree::Process() 758 758 { 759 759 // … … 816 816 // If a selector is given the selector is post processed 817 817 // 818 Bool_t MReadTree::PostProcess()818 Int_t MReadTree::PostProcess() 819 819 { 820 820 return GetSelector() ? GetSelector()->CallPostProcess() : kTRUE; -
trunk/MagicSoft/Mars/mfileio/MReadTree.h
r2123 r2206 68 68 virtual Int_t AddFiles(const MReadTree &read); 69 69 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(); 73 73 74 74 Bool_t Notify(); -
trunk/MagicSoft/Mars/mfileio/MWriteFile.cc
r2173 r2206 57 57 // to the output file. 58 58 // 59 Bool_t MWriteFile::PreProcess(MParList *pList)59 Int_t MWriteFile::PreProcess(MParList *pList) 60 60 { 61 61 // … … 89 89 // the container should be written to the output. 90 90 // 91 Bool_t MWriteFile::Process()91 Int_t MWriteFile::Process() 92 92 { 93 93 CheckAndWrite(); 94 95 94 return kTRUE; 96 95 } … … 101 100 // the container should be written to the output. 102 101 // 103 Bool_t MWriteFile::PostProcess()102 Int_t MWriteFile::PostProcess() 104 103 { 105 104 // … … 107 106 // 108 107 CheckAndWrite(); 109 110 108 return kTRUE; 111 109 } -
trunk/MagicSoft/Mars/mfileio/MWriteFile.h
r1381 r2206 9 9 { 10 10 private: 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(); 14 14 15 15 virtual Bool_t IsFileOpen() const = 0; -
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 -
trunk/MagicSoft/Mars/mgui/MCamEvent.cc
r2178 r2206 30 30 #include "MCamEvent.h" 31 31 32 #include "MGeomCam.h" 33 32 34 ClassImp(MCamEvent); 35 -
trunk/MagicSoft/Mars/mgui/MCamEvent.h
r2178 r2206 18 18 { 19 19 public: 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; 21 21 virtual void DrawPixelContent(Int_t num) const = 0; 22 22 23 ClassDef(MCamEvent, 0) // A hexagon for MAGIC23 ClassDef(MCamEvent, 0) // A camera event 24 24 }; 25 25 -
trunk/MagicSoft/Mars/mhist/MFillH.cc
r2178 r2206 360 360 // with the same type as the given object name. 361 361 // 362 Bool_t MFillH::PreProcess(MParList *pList)362 Int_t MFillH::PreProcess(MParList *pList) 363 363 { 364 364 if (fIndex) … … 467 467 // Fills the data from the parameter conatiner into the histogram container 468 468 // 469 Bool_t MFillH::Process()469 Int_t MFillH::Process() 470 470 { 471 471 if (fIndex) … … 485 485 // has been filled into the histogram. 486 486 // 487 Bool_t MFillH::PostProcess()487 Int_t MFillH::PostProcess() 488 488 { 489 489 // -
trunk/MagicSoft/Mars/mhist/MFillH.h
r2117 r2206 59 59 void SetWeight(const char *name) { fWeightName = name; } 60 60 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(); 64 64 65 65 ClassDef(MFillH, 2) // Task to fill a histogram with data from a parameter container -
trunk/MagicSoft/Mars/mhist/MHCerPhotEvt.cc
r2178 r2206 36 36 37 37 #include "MParList.h" 38 #include "MC erPhotEvt.h"38 #include "MCamEvent.h" 39 39 #include "MCamDisplay.h" 40 40 … … 48 48 // -------------------------------------------------------------------------- 49 49 // 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 //67 50 // Initialize the name and title of the task. 68 51 // Resets the sum histogram 69 52 // 70 53 MHCerPhotEvt::MHCerPhotEvt(const char *name, const char *title) 71 : f Cam(NULL), fEvt(NULL), fDispl(NULL)54 : fSum(NULL), fEvt(NULL) 72 55 { 73 56 // … … 76 59 fName = name ? name : "MHCerPhotEvt"; 77 60 fTitle = title ? title : "Average of MCerPhotEvts"; 78 79 Clear();80 61 } 81 62 … … 86 67 MHCerPhotEvt::~MHCerPhotEvt() 87 68 { 88 if (f Displ)89 delete f Displ;69 if (fSum) 70 delete fSum; 90 71 } 91 72 … … 99 80 Bool_t MHCerPhotEvt::SetupFill(const MParList *plist) 100 81 { 101 fEvt = (MC erPhotEvt*)plist->FindObject("MCerPhotEvt");82 fEvt = (MCamEvent*)plist->FindObject(fNameEvt, "MCamEvent"); 102 83 if (!fEvt) 103 84 *fLog << warn << GetDescriptor() << ": No MCerPhotEvt available..." << endl; 104 85 105 fCam = (MGeomCam*)plist->FindObject("MGeomCam");106 if (! fCam)86 MGeomCam *cam = (MGeomCam*)plist->FindObject("MGeomCam"); 87 if (!cam) 107 88 *fLog << warn << GetDescriptor() << ": No MGeomCam found." << endl; 108 89 109 Clear(); 90 if (fSum) 91 delete (fSum); 92 fSum = new MCamDisplay(*cam, fNameEvt+";avg", fNameEvt+" Avarage"); 110 93 111 94 return kTRUE; … … 118 101 Bool_t MHCerPhotEvt::Fill(const MParContainer *par, const Stat_t w) 119 102 { 120 const MC erPhotEvt *evt = par ? (MCerPhotEvt*)par: fEvt;103 const MCamEvent *evt = par ? dynamic_cast<const MCamEvent*>(par) : fEvt; 121 104 if (!evt) 122 105 { … … 124 107 return kFALSE; 125 108 } 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); 140 110 141 111 return kTRUE; … … 148 118 Bool_t MHCerPhotEvt::Finalize() 149 119 { 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()); 154 122 return kTRUE; 155 123 } 156 124 /* 157 125 // -------------------------------------------------------------------------- 158 126 // … … 161 129 void MHCerPhotEvt::Draw(Option_t *) 162 130 { 163 if (!f Cam)131 if (!fSum) 164 132 { 165 133 *fLog << warn << "WARNING - Cannot draw " << GetDescriptor() << ": No Camera Geometry available." << endl; … … 169 137 TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this, 750, 600); 170 138 pad->SetBorderMode(0); 139 //pad->Divide(1,1); 140 //gPad->SetBorderMode(0); 171 141 172 142 AppendPad(""); … … 179 149 void MHCerPhotEvt::Paint(Option_t *option) 180 150 { 181 if (!fCam) 182 { 183 *fLog << warn << "WARNING - Cannot paint " << GetDescriptor() << ": No Camera Geometry available." << endl; 151 if (!fSum) 184 152 return; 185 }186 153 187 if (!fDispl) 188 fDispl = new MCamDisplay(fCam); 154 fSum->Paint(); 155 } 156 */ 189 157 190 fDispl->Fill(fSum); 191 fDispl->Paint(); 158 TH1 *MHCerPhotEvt::GetHistByName(const TString name) 159 { 160 return fSum; 192 161 } -
trunk/MagicSoft/Mars/mhist/MHCerPhotEvt.h
r2173 r2206 6 6 #endif 7 7 8 #ifndef MARS_MCerPhotEvt9 #include "MCerPhotEvt.h"10 #endif11 12 class TH1D;13 8 class MCamDisplay; 9 class MCamEvent; 14 10 15 11 class MHCerPhotEvt : public MH 16 12 { 17 13 private: 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(); 23 22 24 23 public: … … 26 25 ~MHCerPhotEvt(); 27 26 28 void Clear(const Option_t *o="");27 void SetNameEvt(const TString name) { fNameEvt = name; } 29 28 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=""); 40 30 41 31 ClassDef(MHCerPhotEvt, 1) // Histogram to sum camera events
Note:
See TracChangeset
for help on using the changeset viewer.