Changeset 2209 for trunk/MagicSoft/Mars
- Timestamp:
- 06/23/03 12:09:05 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 6 added
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2205 r2209 1 1 -*-*- END OF LINE -*-*- 2 3 2003/06/23: Thomas Bretz 4 5 * manalysis/MBlindPixelCalc.[h,cc], manalysis/MCT1PadONOFF.[h,cc], 6 manalysis/MCT1PadSchweizer.[h,cc], manalysis/MCompProbCalc.[h,cc], 7 manalysis/MCT1PointingCorrCalc.[h,cc], manalysis/MEnergyEstimate.[h,cc], 8 manalysis/MCT1SupercutsCalc.[h,cc], manalysis/MEnergyEstParam.[h,cc], 9 manalysis/MFiltercutsCalc.[cc,h], manalysis/MMatrixLoop.[h,cc], 10 manalysis/MMcPedestalCopy.[h,cc], manalysis/MMcPedestalNSBAdd.[h,cc], 11 manalysis/MMcTriggerLvl2Calc.[h,cc], manalysis/MPadding.[h,cc], 12 manalysis/MMultiDimDistCalc.[h,cc], manalysis/MPedCalcPedRun.[h,cc], 13 manalysis/MPedestalCalc.[h,cc], manalysis/MPointingCorr.[h,cc], 14 mbase/MClone.[h,cc], mbase/MGTask.[h,cc], mbase/MPrint.[h,cc], 15 mbase/MTask.[h,cc], mbase/MTaskInteractive.[h,cc], 16 mbase/MTaskList.[h,cc], mtools/MChisqEval.[h,cc], 17 mbase/MContinue.[h,cc], mdatacheck/MDumpEvtHeader.[h,cc] 18 mfileio/MCT1ReadAscii.[h,cc], mfileio/MCT1ReadPreProc.[h,cc], 19 mfileio/MReadCurrents.[h,cc], mfileio/MReadMarsFile.[h,cc], 20 mfileio/MReadRflFile.[h,cc], mfilter/MF.[h,cc], 21 mfilter/MFAlpha.[h,cc], mfilter/MFCT1SelBasic.[h,cc], 22 mfilter/MFCT1SelFinal.[h,cc], mfilter/MFCT1SelStandard.[h,cc], 23 mfilter/MFDataChain.[h,cc], mfilter/MFDataMember.[h,cc], 24 mfilter/MFEnergySlope.[h,cc], mfilter/MFEventSelector.[h,cc], 25 mfilter/MFEventSelector2.[h,cc], mfilter/MFParticleId.[h,cc], 26 mfilter/MFTriggerLvl1.[h,cc], mfilter/MFTriggerLvl2.[h,cc], 27 mfilter/MFilterList.[h,cc], mhist/MFillH.[h,cc], 28 mimage/MCameraSmooth.[h,cc], mimage/MHillasCalc.[h,cc], 29 mimage/MHillasSrcCalc.[h,cc], mimage/MImgCleanStd.[h,cc], 30 mimage/MNewImageParCalc.[h,cc], mmontecarlo/MMcThresholdCalc.[h,cc], 31 mranforest/MRanForestCalc.[h,cc], mranforest/MRanForestFill.[h,cc] 32 mmontecarlo/MMcTimeGenerate.[h,cc], mranforest/MRanForestGrow.[h,cc], 33 mmontecarlo/MMcCollectionAreaCalc.[h,cc], mraw/MRawFileWrite.[h,cc], 34 mmontecarlo/MMcTriggerRateCalc.[h,cc], mraw/MRawFileRead.[h,cc], 35 manalysis/MSigmabarCalc.[h,cc]: 36 - changed Bool_t in *Process to Int_t to support newer root 37 versions correctly - PRELIMINARY (will be replaced by 38 enums in the future) 39 40 * manalysis/MCerPhotEvt.[h,cc]: 41 - added case 3 and 4 to GetPixelContent 42 - changed definition of GetPixelContent 43 44 * manalysis/MCurrents.[h,cc], manalysis/MPedestalCam.[h,cc]: 45 - changed definition of GetPixelContent 46 47 * manalysis/MFiltercutsCalc.[h,cc]: 48 - Added list to ListOfCleanups, and set kMustCleanup for list 49 - Set kMustCleanup for external filters 50 51 * mbase/MEvtLoop.[h,cc]: 52 - added to ListOfCleanups 53 - Set kMustCleanup for parlist, progressbar and display 54 - added some checks for root's Batch-Mode 55 - no need for checking ListOfSpecials for fDisplay (this is now 56 handled through the Cleanups) 57 - No need for kFileExit anymore (this can now be handles through 58 the Cleanups) 59 - added recursiveRemove to support Cleanups 60 - added SetDisplay to set kMustCleanup for fDisplay 61 62 * mbase/MTaskList.cc, mdata/MDataArray.cc, mdata/MDataList.cc, 63 mfilter/MFilterList.cc: 64 - added lists to ListOfCleanups 65 - Set kMustCleanup for the lists 66 67 * mdatacheck/DataCheckLinkDef.h, mdatacheck/Makefile: 68 - removed unnecessary MDumpEvtHeader 69 70 * mbase/MContinue.[h,cc]: 71 - added SetDisplay to support setting display for the filter 72 - added SetLogStream to support setting logstream for the filter 73 74 * mfilter/MFCT1SelBasic.cc, mfilter/MFCT1SelFinal.cc, 75 mfilter/MFCT1SelStandard.cc: 76 - added Set-function to simplify Process 77 78 * mgui/MCamEvent.[h,cc]: 79 - changed GetPixelContent definition 80 81 * mhist/MH.cc: 82 - fixed Draw(TH1&, TH1&) and DrawCopy layout for newer root versions 83 84 * mimage/MImgCleanStd.cc: 85 - fixed a bug in the access to ispixused-array (GetNeighbor 86 could exceed maximum entries. 87 88 * mmain/MStatusDisplay.[h,cc]: 89 - preliminary fixes to support root's batch mode 90 - removed adding MStatusDisplay to ListOfCleanups 91 - changed code updating the Canvas' 92 - exit now handled by Cleanups, so this can be deleted immediatly 93 94 * mraw/MRawEvtData.[h,cc]: 95 - changed definition of GetPixelContent 96 - added code to GetPixelContent 97 98 * mraw/MRawEvtPixelIter.[h,cc]: 99 - returns GetNumMaxHiGainSample 100 101 * mreflector/MRflEvtData.[h,cc]: 102 - use static_cast in GetPhoton 103 - added GetPixelContent 104 105 * mhist/MHTriggerLvl0.[h,cc], MHmhist/Camera.[h,cc], 106 mhist/MHCamEvent.[h,cc]: 107 - added 108 109 * manalysis/MSigmabar.cc: 110 - unimportant simplification 111 112 * manalysis/MSigmabarCalc.cc: 113 - added a preliminary workaround to support files without MMcEvt 114 - make use of FLT_MAX 115 116 * mgeom/MGeomCam.[h,cc]: 117 - Moved fPixels from pointer to an instance 118 - removed destructor 119 - use static_cast on operator[] 120 - Use ForEach macro in CheckOuterRing 121 122 * mhist/MHSigmaTheta.cc: 123 - added a preliminary workaround to support files without MMcEvt 124 125 2 126 3 127 2003/06/19: Thomas Bretz -
trunk/MagicSoft/Mars/manalysis/MSigmabar.cc
r2173 r2209 145 145 } 146 146 147 const MGeomPix &gpix = geom[id]; 148 const MPedestalPix &pix = ped[id]; 147 const MGeomPix &gpix = geom[id]; 149 148 150 149 Int_t sector = (Int_t)(atan2(gpix.GetY(),gpix.GetX())*6 / (TMath::Pi()*2)); … … 153 152 154 153 // count only those pixels which have a sigma != 0.0 155 const Float_t sigma = p ix.GetMeanRms();154 const Float_t sigma = ped[id].GetMeanRms(); 156 155 157 156 if ( sigma <= 0 ) -
trunk/MagicSoft/Mars/manalysis/MSigmabarCalc.cc
r2173 r2209 65 65 } 66 66 67 MSigmabarCalc::~MSigmabarCalc()68 {69 // nothing special yet.70 }71 72 67 // -------------------------------------------------------------------------- 73 68 // … … 75 70 // if not create one and add them to the list 76 71 // 77 Bool_t MSigmabarCalc::PreProcess(MParList *pList)72 Int_t MSigmabarCalc::PreProcess(MParList *pList) 78 73 { 79 74 fCam = (MGeomCam*)pList->FindObject("MGeomCam"); … … 91 86 } 92 87 93 fSig = (MSigmabar*)pList->FindCreateObj("MSigmabar");94 if (!fSig)95 {96 *fLog << err << "MSigmabar not found... aborting." << endl;97 return kFALSE;98 }99 100 fSigParam = (MSigmabarParam*)pList->FindCreateObj("MSigmabarParam");101 if (!fSigParam)102 {103 *fLog << err << "MSigmabarParam not found... aborting." << endl;104 return kFALSE;105 }106 107 88 fRun = (MRawRunHeader*)pList->FindObject("MRawRunHeader"); 108 89 if (!fRun) … … 111 92 return kFALSE; 112 93 } 113 94 114 95 // This is needed for determining min/max Theta 115 96 fMcEvt = (MMcEvt*)pList->FindObject("MMcEvt"); 116 97 if (!fMcEvt) 117 { 118 *fLog << err << "MMcEvt not found... aborting." << endl; 119 return kFALSE; 120 } 98 { 99 *fLog << warn << "MMcEvt not found... aborting." << endl; 100 fThetaMin = 0; 101 fThetaMax = 90; 102 } 121 103 122 104 fEvt = (MCerPhotEvt*)pList->FindObject("MCerPhotEvt"); … … 126 108 return kFALSE; 127 109 } 110 111 fSig = (MSigmabar*)pList->FindCreateObj("MSigmabar"); 112 if (!fSig) 113 return kFALSE; 114 115 fSigParam = (MSigmabarParam*)pList->FindCreateObj("MSigmabarParam"); 116 if (!fSigParam) 117 return kFALSE; 118 128 119 129 120 return kTRUE; … … 137 128 // values. Preliminary. 138 129 // 139 Bool_t MSigmabarCalc::Process()130 Int_t MSigmabarCalc::Process() 140 131 { 141 132 const Double_t rc = fSig->Calc(*fCam, *fPed, *fEvt); 142 133 143 fSigmabarMax = TMath::Max(rc, fSigmabarMax); 144 fSigmabarMin = TMath::Min(rc, fSigmabarMin); 134 if (rc>fSigmabarMax) fSigmabarMax=rc; 135 if (rc<fSigmabarMin) fSigmabarMin=rc; 136 137 if (!fMcEvt) 138 return kTRUE; 145 139 146 140 const Double_t theta = fMcEvt->GetTelescopeTheta()*kRad2Deg; 147 141 148 fThetaMax = TMath::Max(theta, fThetaMax);149 fThetaMin = TMath::Min(theta, fThetaMin);142 if (theta>fSigmabarMax) fSigmabarMax=theta; 143 if (theta<fSigmabarMax) fSigmabarMin=theta; 150 144 151 145 return kTRUE; … … 169 163 void MSigmabarCalc::Reset() 170 164 { 171 fThetaMin = 200; // there must be a function which gives me the hightest 172 fThetaMax = 0; // value allowed for a certain type! 173 fSigmabarMin = 200; 165 if (!fMcEvt) 166 return; 167 168 fThetaMin = FLT_MAX; 169 fThetaMax = 0; 170 fSigmabarMin = FLT_MAX; 174 171 fSigmabarMax = 0; 175 172 } -
trunk/MagicSoft/Mars/manalysis/MSigmabarCalc.h
r1951 r2209 48 48 void Reset(); 49 49 50 Int_t PreProcess(MParList *pList); 51 Int_t Process(); 52 53 Bool_t ReInit(MParList *pList); 54 50 55 public: 51 56 MSigmabarCalc(const char *name=NULL, const char *title=NULL); 52 ~MSigmabarCalc();53 54 Bool_t PreProcess(MParList *pList);55 Bool_t ReInit(MParList *pList);56 Bool_t Process();57 57 58 58 ClassDef(MSigmabarCalc, 0) // task for calculating sigmabar -
trunk/MagicSoft/Mars/mbase/MEvtLoop.cc
r2206 r2209 180 180 } 181 181 #endif 182 183 void MEvtLoop::SetDisplay(MStatusDisplay *d) 184 { 185 MParContainer::SetDisplay(d); 186 if (!d) 187 { 188 fProgress=NULL; 189 return; 190 } 191 192 d->SetBit(kMustCleanup); 193 if (fParList) 194 fParList->SetDisplay(d); 195 } 182 196 183 197 // -------------------------------------------------------------------------- … … 933 947 934 948 if (obj==fDisplay) 935 {936 if (fParList)937 fParList->SetDisplay(NULL);938 949 SetDisplay(NULL); 939 fProgress = NULL;940 }941 950 942 951 if (obj==fLog) -
trunk/MagicSoft/Mars/mbase/MEvtLoop.h
r2206 r2209 51 51 52 52 MStatusDisplay *GetDisplay() { return fDisplay; } 53 void SetDisplay(MStatusDisplay *d); 53 54 54 55 void SetOwner(Bool_t enable=kTRUE); -
trunk/MagicSoft/Mars/mgeom/MGeomCam.cc
r2173 r2209 46 46 using namespace std; 47 47 48 MGeomCam::MGeomCam() 49 : fNumPixels(0), fCamDist(0), fConvMm2Deg(0) 50 { 51 } 52 53 54 48 55 // -------------------------------------------------------------------------- 49 56 // … … 52 59 // 53 60 MGeomCam::MGeomCam(UInt_t npix, Float_t dist, const char *name, const char *title) 54 : fNumPixels(npix), fCamDist(dist), fConvMm2Deg(kRad2Deg/(dist*1000)) 61 : fNumPixels(npix), fCamDist(dist), fConvMm2Deg(kRad2Deg/(dist*1000)), fPixels(npix) 55 62 { 56 63 fName = name ? name : "MGeomCam"; 57 64 fTitle = title ? title : "Storage container for a camera geometry"; 58 65 59 fPixels = new TObjArray(npix);60 61 66 // 62 67 // make sure that the destructor delete all contained objects 63 68 // 64 fPixels ->SetOwner();69 fPixels.SetOwner(); 65 70 66 71 for (UInt_t i=0; i<npix; i++) 67 (*fPixels)[i] = new MGeomPix;72 fPixels[i] = new MGeomPix; 68 73 69 74 SetReadyToSave(); 70 75 } 71 76 72 // -------------------------------------------------------------------------- 73 // 74 // Destructor delete the pixel array with all pixels 75 // 76 MGeomCam::~MGeomCam() 77 MGeomPix &MGeomCam::operator[](Int_t i) 77 78 { 78 delete fPixels; 79 return *static_cast<MGeomPix*>(fPixels.UncheckedAt(i)); 80 } 81 82 MGeomPix &MGeomCam::operator[](Int_t i) const 83 { 84 return *static_cast<MGeomPix*>(fPixels.UncheckedAt(i)); 79 85 } 80 86 … … 86 92 void MGeomCam::InitOuterRing() 87 93 { 88 for (UInt_t i=0; i<fNumPixels; i++) 89 (*this)[i].CheckOuterRing(*this); 94 fPixels.ForEach(MGeomPix, CheckOuterRing)(*this); 90 95 } 91 96 … … 134 139 *fLog << all << " Number of Pixels (" << GetTitle() << "): " << fNumPixels << endl; 135 140 136 for (UInt_t i=0; i<fNumPixels; i++) 137 { 138 *fLog << " Pixel: " << i << " "; 139 (*this)[i].Print(); 140 } 141 fPixels.Print(); 141 142 } 142 143 -
trunk/MagicSoft/Mars/mgeom/MGeomCam.h
r2135 r2209 14 14 { 15 15 private: 16 UInt_t fNumPixels; // Number of pixels in this camera17 Float_t fMaxRadius; // maximum radius of the camera (eg. for GUI layout)16 UInt_t fNumPixels; // Number of pixels in this camera 17 Float_t fMaxRadius; // maximum radius of the camera (eg. for GUI layout) 18 18 19 Float_t fCamDist; // [m] Average distance of the camera from the mirror20 Float_t fConvMm2Deg; // conversion factor to convert mm in the camera plain into degrees19 Float_t fCamDist; // [m] Average distance of the camera from the mirror 20 Float_t fConvMm2Deg; // conversion factor to convert mm in the camera plain into degrees 21 21 22 TObjArray *fPixels;// Array of singel pixels storing the geometry22 TObjArray fPixels; // Array of singel pixels storing the geometry 23 23 24 24 protected: … … 27 27 28 28 public: 29 MGeomCam(); 29 30 MGeomCam(UInt_t npix, Float_t dist, const char *name=NULL, const char *title=NULL); 30 virtual ~MGeomCam();31 31 32 32 virtual TObject *Clone(const char *newname=NULL) const; … … 39 39 Float_t GetPixRatio(UInt_t i) const; 40 40 41 MGeomPix &operator[](Int_t i) { return *(MGeomPix*)fPixels->UncheckedAt(i); }42 MGeomPix &operator[](Int_t i) const { return *(MGeomPix*)fPixels->UncheckedAt(i); }41 MGeomPix &operator[](Int_t i); 42 MGeomPix &operator[](Int_t i) const; 43 43 44 44 virtual void Print(Option_t *opt=NULL) const; -
trunk/MagicSoft/Mars/mhist/MH.cc
r2180 r2209 652 652 // Rename first statistics box 653 653 // 654 TPaveStats &s1 = *(TPaveStats*)gPad->FindObject("stats"); 655 const Double_t x1 = s1.GetX1NDC()-0.01; 656 s1.SetName((TString)"Stat"+hist1.GetTitle()); 657 s1.SetX1NDC(x1-(s1.GetX2NDC()-s1.GetX1NDC())); 658 s1.SetX2NDC(x1); 654 TPaveStats *s1 = (TPaveStats*)gPad->FindObject("stats"); 655 if (!s1) 656 s1 = (TPaveStats*)hist1.GetListOfFunctions()->FindObject("stats"); 657 else 658 s1->SetName((TString)"Stat"+hist1.GetTitle()); 659 660 if (s1 && s1->GetX2NDC()>0.95) 661 { 662 const Double_t x1 = s1->GetX1NDC()-0.01; 663 s1->SetX1NDC(x1-(s1->GetX2NDC()-s1->GetX1NDC())); 664 s1->SetX2NDC(x1); 665 } 659 666 660 667 // … … 667 674 // Draw Legend 668 675 // 669 TPaveStats &s2 = *(TPaveStats*)gPad->FindObject("stats"); 670 TLegend &l = *new TLegend(s2.GetX1NDC(), 671 s2.GetY1NDC()-0.015-(s2.GetY2NDC()-s2.GetY1NDC())/2, 672 s2.GetX2NDC(), 673 s2.GetY1NDC()-0.01 674 ); 675 l.AddEntry(h1, h1->GetTitle()); 676 l.AddEntry(h2, h2->GetTitle()); 677 l.SetTextSize(s2.GetTextSize()); 678 l.SetTextFont(s2.GetTextFont()); 679 l.SetBorderSize(s2.GetBorderSize()); 680 l.SetBit(kCanDelete); 681 l.Draw(); 676 TPaveStats *s2 = (TPaveStats*)gPad->FindObject("stats"); 677 if (!s2) 678 s2 = (TPaveStats*)hist2.GetListOfFunctions()->FindObject("stats"); 679 680 if (s2) 681 { 682 TLegend &l = *new TLegend(s2->GetX1NDC(), 683 s2->GetY1NDC()-0.015-(s2->GetY2NDC()-s2->GetY1NDC())/2, 684 s2->GetX2NDC(), 685 s2->GetY1NDC()-0.01 686 ); 687 l.AddEntry(h1, h1->GetTitle()); 688 l.AddEntry(h2, h2->GetTitle()); 689 l.SetTextSize(s2->GetTextSize()); 690 l.SetTextFont(s2->GetTextFont()); 691 l.SetBorderSize(s2->GetBorderSize()); 692 l.SetBit(kCanDelete); 693 l.Draw(); 694 } 682 695 } 683 696 … … 740 753 s1->SetName((TString)"Stat"+hist1.GetTitle()); 741 754 742 if (s1 )755 if (s1 && s1->GetX2NDC()>0.95) 743 756 { 744 757 const Double_t x1 = s1->GetX1NDC()-0.01; -
trunk/MagicSoft/Mars/mhist/MHSigmaTheta.cc
r2173 r2209 115 115 fMcEvt = (MMcEvt*)plist->FindObject("MMcEvt"); 116 116 if (!fMcEvt) 117 { 118 *fLog << err << "MMcEvt not found... aborting." << endl; 119 return kFALSE; 120 } 117 *fLog << warn << "MMcEvt not found... aborting." << endl; 121 118 122 119 fPed = (MPedestalCam*)plist->FindObject("MPedestalCam"); … … 193 190 Bool_t MHSigmaTheta::Fill(const MParContainer *par, const Stat_t w) 194 191 { 195 Double_t theta = fMcEvt ->GetTelescopeTheta()*kRad2Deg;192 Double_t theta = fMcEvt ? fMcEvt->GetTelescopeTheta()*kRad2Deg : 0; 196 193 Double_t mysig = fSigmabar->Calc(*fCam, *fPed, *fEvt); 197 194 -
trunk/MagicSoft/Mars/mimage/MCameraSmooth.cc
r2173 r2209 66 66 // - get MGeomCam from the parameter list 67 67 // 68 Bool_t MCameraSmooth::PreProcess (MParList *pList)68 Int_t MCameraSmooth::PreProcess (MParList *pList) 69 69 { 70 70 fEvt = (MCerPhotEvt*)pList->FindObject("MCerPhotEvt"); … … 89 89 // Do the smoothing 90 90 // 91 Bool_t MCameraSmooth::Process()91 Int_t MCameraSmooth::Process() 92 92 { 93 93 const UShort_t entries = fEvt->GetNumPixels(); -
trunk/MagicSoft/Mars/mimage/MCameraSmooth.h
r1940 r2209 23 23 Bool_t fUseCentralPixel; // use also the central pixel 24 24 25 Int_t PreProcess(MParList *pList); 26 Int_t Process(); 27 25 28 public: 26 29 MCameraSmooth(Byte_t cnt=1, const char *name=NULL, const char *title=NULL); 27 30 28 31 void SetUseCetralPixel(Bool_t b=kTRUE) { fUseCentralPixel=kTRUE; } 29 30 Bool_t PreProcess(MParList *pList);31 Bool_t Process();32 32 33 33 ClassDef(MCameraSmooth, 0) // task to smooth the camera contants -
trunk/MagicSoft/Mars/mimage/MHillasCalc.cc
r2173 r2209 90 90 // MNewImagePar, too. 91 91 // 92 Bool_t MHillasCalc::PreProcess(MParList *pList)92 Int_t MHillasCalc::PreProcess(MParList *pList) 93 93 { 94 94 // necessary … … 147 147 // If the calculation wasn't sucessfull skip this event 148 148 // 149 Bool_t MHillasCalc::Process()149 Int_t MHillasCalc::Process() 150 150 { 151 151 if (TestFlag(kCalcHillas)) … … 176 176 // is calculated with respect to the number of executions of this task. 177 177 // 178 Bool_t MHillasCalc::PostProcess()178 Int_t MHillasCalc::PostProcess() 179 179 { 180 180 if (GetNumExecutions()==0) -
trunk/MagicSoft/Mars/mimage/MHillasCalc.h
r2100 r2209 37 37 Int_t fFlags; 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 public: -
trunk/MagicSoft/Mars/mimage/MHillasSrcCalc.cc
r2173 r2209 72 72 // ------------------------------------------------------------------------- 73 73 // 74 Bool_t MHillasSrcCalc::PreProcess(MParList *pList)74 Int_t MHillasSrcCalc::PreProcess(MParList *pList) 75 75 { 76 76 fHillas = (MHillas*)pList->FindObject(fHillasInput, "MHillas"); … … 103 103 // ------------------------------------------------------------------------- 104 104 // 105 Bool_t MHillasSrcCalc::Process()105 Int_t MHillasSrcCalc::Process() 106 106 { 107 107 … … 120 120 // is calculated with respect to the number of executions of this task. 121 121 // 122 Bool_t MHillasSrcCalc::PostProcess()122 Int_t MHillasSrcCalc::PostProcess() 123 123 { 124 124 if (GetNumExecutions()==0) -
trunk/MagicSoft/Mars/mimage/MHillasSrcCalc.h
r2004 r2209 25 25 void StreamPrimitive(ofstream &out) const; 26 26 27 Bool_t PreProcess(MParList *plist);28 Bool_t Process();29 Bool_t PostProcess();27 Int_t PreProcess(MParList *plist); 28 Int_t Process(); 29 Int_t PostProcess(); 30 30 31 31 public: -
trunk/MagicSoft/Mars/mimage/MImgCleanStd.cc
r2173 r2209 316 316 // Returns the maximum Pixel Id (used for ispixused in CleanStep2) 317 317 // 318 Int_tMImgCleanStd::CleanStep1Std()318 void MImgCleanStd::CleanStep1Std() 319 319 { 320 320 const Int_t entries = fEvt->GetNumPixels(); 321 322 Int_t max = entries;323 321 324 322 // … … 339 337 if (entry * ratio <= fCleanLvl1 * noise) 340 338 pix.SetPixelUnused(); 341 342 if (id>max) 343 max = id; 344 } 345 346 return max; 339 } 347 340 } 348 341 … … 358 351 // Returns the maximum Pixel Id (used for ispixused in CleanStep2) 359 352 // 360 Int_tMImgCleanStd::CleanStep1Dem()353 void MImgCleanStd::CleanStep1Dem() 361 354 { 362 355 const Int_t entries = fEvt->GetNumPixels(); 363 364 Int_t max = entries;365 356 366 357 // … … 380 371 if (entry * ratio <= fCleanLvl1 * fInnerNoise) 381 372 pix.SetPixelUnused(); 382 383 if (id>max) 384 max = id; 385 } 386 return max; 373 } 387 374 } 388 375 … … 394 381 // Returns the maximum Pixel Id (used for ispixused in CleanStep2) 395 382 // 396 Int_tMImgCleanStd::CleanStep1()383 void MImgCleanStd::CleanStep1() 397 384 { 398 385 switch (fCleaningMethod) 399 386 { 400 387 case kStandard: 401 return CleanStep1Std(); 388 CleanStep1Std(); 389 return; 402 390 case kDemocratic: 403 return CleanStep1Dem(); 404 } 405 406 return 0; 391 CleanStep1Dem(); 392 return; 393 } 407 394 } 408 395 … … 415 402 // Takes the maximum pixel id from CleanStep1 as an argument 416 403 // 417 void MImgCleanStd::CleanStep2( Int_t max)404 void MImgCleanStd::CleanStep2() 418 405 { 419 406 const Int_t entries = fEvt->GetNumPixels(); … … 425 412 // (MCerPhotEvt::IsPixelUsed) all the time. 426 413 // 427 Byte_t *ispixused = new Byte_t[ max+1];414 Byte_t *ispixused = new Byte_t[fCam->GetNumPixels()]; 428 415 429 416 for (Int_t i=0; i<entries; i++) … … 463 450 } 464 451 } 465 452 466 453 if (hasNeighbor == kFALSE) 467 454 pix.SetPixelUnused(); … … 640 627 // if not create one and add them to the list 641 628 // 642 Bool_t MImgCleanStd::PreProcess (MParList *pList)629 Int_t MImgCleanStd::PreProcess (MParList *pList) 643 630 { 644 631 fCam = (MGeomCam*)pList->FindObject("MGeomCam"); … … 673 660 // Cleans the image. 674 661 // 675 Bool_t MImgCleanStd::Process()662 Int_t MImgCleanStd::Process() 676 663 { 677 664 if (fSgb) 678 665 fInnerNoise = fSgb->GetSigmabarInner(); 679 666 680 const Int_t max =CleanStep1();681 CleanStep2( max);667 CleanStep1(); 668 CleanStep2(); 682 669 CleanStep3(); 683 670 -
trunk/MagicSoft/Mars/mimage/MImgCleanStd.h
r2052 r2209 38 38 void StreamPrimitive(ofstream &out) const; 39 39 40 Int_tCleanStep1Dem();41 Int_tCleanStep1Std();40 void CleanStep1Dem(); 41 void CleanStep1Std(); 42 42 Bool_t CleanStep3Dem(const MCerPhotPix &pix); 43 43 Bool_t CleanStep3Std(const MCerPhotPix &pix); … … 45 45 void CleanStep4(UShort_t r, MCerPhotPix &pix); 46 46 47 void CleanStep1(); 48 void CleanStep2(); 49 void CleanStep3(); 50 51 Int_t PreProcess(MParList *pList); 52 Int_t Process(); 53 47 54 public: 48 55 MImgCleanStd(const Float_t lvl1=3.0, const Float_t lvl2=2.5, 49 56 const char *name=NULL, const char *title=NULL); 50 51 Int_t CleanStep1();52 void CleanStep2(Int_t max);53 void CleanStep3();54 55 Bool_t PreProcess(MParList *pList);56 Bool_t Process();57 58 57 void Print(Option_t *o="") const; 59 58 -
trunk/MagicSoft/Mars/mimage/MNewImageParCalc.cc
r2026 r2209 72 72 // ------------------------------------------------------------------------- 73 73 // 74 Bool_t MNewImageParCalc::PreProcess(MParList *pList)74 Int_t MNewImageParCalc::PreProcess(MParList *pList) 75 75 { 76 76 fHillas = (MHillas*)pList->FindObject(fHillasInput, "MHillas"); … … 113 113 // ------------------------------------------------------------------------- 114 114 // 115 Bool_t MNewImageParCalc::Process()115 Int_t MNewImageParCalc::Process() 116 116 { 117 117 -
trunk/MagicSoft/Mars/mimage/MNewImageParCalc.h
r2026 r2209 28 28 //Int_t fErrors; 29 29 30 Bool_t PreProcess(MParList *plist);31 Bool_t Process();30 Int_t PreProcess(MParList *plist); 31 Int_t Process(); 32 32 //Bool_t PostProcess(); 33 33
Note:
See TracChangeset
for help on using the changeset viewer.