Changeset 3199 for trunk/MagicSoft/Mars/manalysis
- Timestamp:
- 02/16/04 15:37:25 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/manalysis
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MPedCalcPedRun.cc
r3039 r3199 108 108 // 109 109 MPedCalcPedRun::MPedCalcPedRun(const char *name, const char *title) 110 : fRawEvt(NULL), fPedestals(NULL) , fSignals(NULL)110 : fRawEvt(NULL), fPedestals(NULL) 111 111 { 112 112 fName = name ? name : "MPedCalcPedRun"; … … 121 121 void MPedCalcPedRun::Clear(const Option_t *o) 122 122 { 123 124 fNumHiGainSamples = 0; 125 fNumPixels = 0; 126 fNumSamplesTot = 0; 127 128 fRawEvt = NULL; 129 fPedestals = NULL; 130 fSignals = NULL; 131 132 return; 133 123 fNumHiGainSamples = 0; 124 fNumSamplesTot = 0; 125 126 fRawEvt = NULL; 127 fPedestals = NULL; 134 128 } 135 129 … … 148 142 Int_t MPedCalcPedRun::PreProcess( MParList *pList ) 149 143 { 144 Clear(); 145 150 146 fRawEvt = (MRawEvtData*)pList->FindObject("MRawEvtData"); 151 147 if (!fRawEvt) … … 159 155 return kFALSE; 160 156 161 fSignals = (MExtractedSignalCam*)pList->FindObject("MExtractedSignalCam");162 163 fNumSamplesTot=0;164 165 157 return kTRUE; 166 158 } … … 186 178 return kTRUE; 187 179 188 fNumPixels= fPedestals->GetSize();189 190 if (fSumx.GetSize()==0)191 192 fSumx.Set( fNumPixels);193 fSumx2.Set( fNumPixels);180 Int_t n = fPedestals->GetSize(); 181 182 if (fSumx.GetSize()==0) 183 { 184 fSumx.Set(n); 185 fSumx2.Set(n); 194 186 195 187 fSumx.Reset(); 196 188 fSumx2.Reset(); 197 189 } 198 190 199 191 // Calculate an even number for the hi gain samples to avoid -
trunk/MagicSoft/Mars/manalysis/MPedCalcPedRun.h
r3190 r3199 1 1 #ifndef MARS_MPedCalcPedRun 2 2 #define MARS_MPedCalcPedRun 3 4 /////////////////////////////////////////////////////////////////////////////5 // //6 // MPedCalcPedRun //7 // //8 // Evaluate the pedestals from pedestal runs //9 // //10 /////////////////////////////////////////////////////////////////////////////11 3 12 4 #ifndef MARS_MTask … … 14 6 #endif 15 7 8 #ifndef ROOT_TArrayF 16 9 #include <TArrayF.h> 10 #endif 17 11 18 12 class MRawEvtData; 19 13 class MPedestalCam; 20 class MExtractedSignalCam;21 14 22 15 class MPedCalcPedRun : public MTask 23 16 { 24 Byte_t fNumHiGainSamples; 25 UShort_t fNumPixels; 26 UInt_t fNumSamplesTot; 17 Byte_t fNumHiGainSamples; 18 UInt_t fNumSamplesTot; 27 19 28 MRawEvtData *fRawEvt; // raw event data (time slices) 29 MPedestalCam *fPedestals; // Pedestals of all pixels in the camera 30 MExtractedSignalCam *fSignals; // Signals of all pixels in the camera 20 MRawEvtData *fRawEvt; // raw event data (time slices) 21 MPedestalCam *fPedestals; // Pedestals of all pixels in the camera 31 22 32 23 TArrayF fSumx; // sum of values -
trunk/MagicSoft/Mars/manalysis/MPedestalCam.h
r3190 r3199 13 13 class MGeomCam; 14 14 class MPedestalPix; 15 15 16 class MPedestalCam : public MCamEvent, public MParContainer 16 17 { 17 18 private: 19 TClonesArray *fArray; //-> FIXME: Change TClonesArray away from a pointer? 20 UInt_t fTotalEntries; // Total number of times, the Process was executed (to estimate the error of pedestal) 18 21 19 TClonesArray *fArray; // FIXME: Change TClonesArray away from a pointer?20 UInt_t fTotalEntries; // Total number of times, the Process was executed (to estimate the error of pedestal)21 22 22 public: 23 MPedestalCam(const char *name=NULL, const char *title=NULL); 24 ~MPedestalCam(); 25 26 void Clear(Option_t *o=""); 27 28 void InitSize(const UInt_t i); 29 30 MPedestalPix &operator[](Int_t i); 31 const MPedestalPix &operator[](Int_t i) const; 23 MPedestalCam(const char *name=NULL, const char *title=NULL); 24 ~MPedestalCam(); 32 25 33 // Setters 34 void SetTotalEntries(const UInt_t n) { fTotalEntries = n; } 26 void Clear(Option_t *o=""); 35 27 36 // Getters 37 UInt_t GetSize() const; 38 UInt_t GetTotalEntries() const { return fTotalEntries; } 28 void InitSize(const UInt_t i); 39 29 40 Float_t GetPedestalMin(const MGeomCam *cam) const; 41 Float_t GetPedestalMax(const MGeomCam *cam) const; 42 43 void Print(Option_t *o="") const; 44 45 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const; 46 void DrawPixelContent(Int_t idx) const; 47 48 ClassDef(MPedestalCam, 1) // Storage Container for all pedestal information of the camera 30 MPedestalPix &operator[](Int_t i); 31 const MPedestalPix &operator[](Int_t i) const; 32 33 // Setters 34 void SetTotalEntries(const ULong_t n) { fTotalEntries = n; } 35 36 // Getters 37 Int_t GetSize() const; 38 ULong_t GetTotalEntries() const { return fTotalEntries; } 39 40 Float_t GetPedestalMin(const MGeomCam *cam) const; 41 Float_t GetPedestalMax(const MGeomCam *cam) const; 42 43 void Print(Option_t *o="") const; 44 45 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const; 46 void DrawPixelContent(Int_t idx) const; 47 48 ClassDef(MPedestalCam, 1) // Storage Container for all pedestal information of the camera 49 49 }; 50 50 51 51 #endif 52
Note:
See TracChangeset
for help on using the changeset viewer.