Changeset 4615
- Timestamp:
- 08/14/04 10:45:14 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r4608 r4615 19 19 20 20 -*-*- END OF LINE -*-*- 21 22 23 2004/08/14: Markus Gaug 24 25 * msignal/MExtractor.cc: 26 - documented data members 27 - included default for SetNamePedContainer() 21 28 22 29 -
trunk/MagicSoft/Mars/msignal/MExtractor.cc
r4608 r4615 74 74 using namespace std; 75 75 76 const Byte_t MExtractor::fgSaturationLimit= 254;77 76 const Byte_t MExtractor::fgSaturationLimit = 254; 77 const TString MExtractor::fgNamePedContainer = "MPedestalCam"; 78 78 // -------------------------------------------------------------------------- 79 79 // … … 84 84 // - all variables to 0 85 85 // - fSaturationLimit to fgSaturationLimit 86 // - fNamePedContainer to fgNamePedContainer 86 87 // 87 88 // Call: … … 90 91 MExtractor::MExtractor(const char *name, const char *title) 91 92 : fPedestals(NULL), fSignals(NULL), fRawEvt(NULL), fRunHeader(NULL), 92 fHiLoLast(0), fNumHiGainSamples(0.), fNumLoGainSamples(0.), 93 fSaturationLimit(fgSaturationLimit), fNamePedContainer("MPedestalCam") 93 fHiLoLast(0), fNumHiGainSamples(0.), fNumLoGainSamples(0.) 94 94 { 95 95 fName = name ? name : "MExtractor"; … … 98 98 AddToBranchList("MRawEvtData.*"); 99 99 100 SetNamePedContainer(); 100 101 SetRange(); 102 SetSaturationLimit(); 101 103 } 102 104 … … 225 227 } 226 228 229 230 /* 231 void MExtractor::FindPedestalLoGain(Byte_t *maxpos, Float_t &sum) const 232 { 233 234 Byte_t *p = maxpos-4; 235 Byte_t *end = maxpos-2; 236 237 Int_t summ = 0; 238 239 while (p<end) 240 summ += *p++; 241 242 sum = summ/2.; 243 244 return; 245 } 246 */ 227 247 // -------------------------------------------------------------------------- 228 248 // … … 242 262 FindSignalHiGain(pixel.GetHiGainSamples()+fHiGainFirst, pixel.GetLoGainSamples(), sumhi, sathi); 243 263 244 Float_t sumlo = 0.;245 Byte_t satlo= 0;264 Float_t sumlo = 0.; 265 Byte_t satlo = 0; 246 266 247 267 if (pixel.HasLoGain()) 248 249 268 FindSignalLoGain(pixel.GetLoGainSamples()+fLoGainFirst, sumlo, satlo); 269 250 270 const Int_t pixid = pixel.GetPixelId(); 251 271 -
trunk/MagicSoft/Mars/msignal/MExtractor.h
r4601 r4615 23 23 { 24 24 protected: 25 static const Byte_t fgSaturationLimit;26 25 27 MPedestalCam *fPedestals; // Pedestals of all pixels in the camera 28 MExtractedSignalCam *fSignals; // Extracted signal of all pixels in the camera 29 30 MRawEvtData *fRawEvt; // raw event data (time slices) 31 MRawRunHeader *fRunHeader; // RunHeader information 32 33 Byte_t fHiGainFirst; 34 Byte_t fLoGainFirst; 35 36 Byte_t fHiGainLast; 37 Byte_t fLoGainLast; 38 39 Byte_t fHiLoLast; 40 41 Float_t fNumHiGainSamples; 42 Float_t fNumLoGainSamples; 43 44 Float_t fSqrtHiGainSamples; 45 Float_t fSqrtLoGainSamples; 46 47 Byte_t fSaturationLimit; 48 TString fNamePedContainer; // name of the 'MPedestalCam' container 49 50 virtual void FindSignalHiGain(Byte_t *firstused, Byte_t *lowgain, Float_t &sum, Byte_t &sat) const { } 51 virtual void FindSignalLoGain(Byte_t *firstused, Float_t &sum, Byte_t &sat) const { } 52 53 Int_t PreProcess(MParList *pList); 54 Bool_t ReInit(MParList *pList); 55 Int_t Process(); 56 void StreamPrimitive(ofstream &out) const; 57 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print); 26 static const Byte_t fgSaturationLimit; //! Default for fSaturationLimit (now set to: 254) 27 static const TString fgNamePedContainer; //! "MPedestalCam" 28 29 MPedestalCam *fPedestals; //! Pedestals of all pixels in the camera 30 MExtractedSignalCam *fSignals; // Extracted signal of all pixels in the camera 31 32 MRawEvtData *fRawEvt; //! Raw event data (time slices) 33 MRawRunHeader *fRunHeader; //! RunHeader information 34 35 Byte_t fHiGainFirst; // First FADC slice nr. to extract the High Gain signal 36 Byte_t fHiGainLast; // Last FADC slice nr. to extract the High Gain signal 37 Byte_t fLoGainFirst; // First FADC slice nr. to extract the Low Gain signal 38 Byte_t fLoGainLast; // Last FADC slice nr. to extract the Low Gain signal 39 40 Byte_t fHiLoLast; // Number of slices in fLoGainSamples counted for the High-Gain signal 41 42 Float_t fNumHiGainSamples; // Number High Gain FADC slices used to extract the signal 43 Float_t fNumLoGainSamples; // Number Low Gain FADC slices used to extract the signal 44 45 Float_t fSqrtHiGainSamples; // Sqrt. nr. High Gain FADC slices used to extract the signal 46 Float_t fSqrtLoGainSamples; // Sqrt. nr. Low Gain FADC slices used to extract the signal 47 48 Byte_t fSaturationLimit; // Highest FADC slice value until being declared saturated 49 TString fNamePedContainer; // Name of the 'MPedestalCam' container 50 51 virtual void FindSignalHiGain(Byte_t *firstused, Byte_t *lowgain, Float_t &sum, Byte_t &sat) const { } 52 virtual void FindSignalLoGain(Byte_t *firstused, Float_t &sum, Byte_t &sat) const { } 53 54 Int_t PreProcess(MParList *pList); 55 Bool_t ReInit(MParList *pList); 56 Int_t Process(); 57 void StreamPrimitive(ofstream &out) const; 58 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print); 58 59 59 60 public: 60 MExtractor(const char *name=NULL, const char *title=NULL);61 61 62 Byte_t GetHiGainFirst() const { return fHiGainFirst; }63 Byte_t GetHiGainLast () const { return fHiGainLast ; }64 Byte_t GetLoGainFirst() const { return fLoGainFirst; }65 Byte_t GetLoGainLast () const { return fLoGainLast ; }66 Float_t GetNumHiGainSamples() const { return fNumHiGainSamples;}67 Float_t GetNumLoGainSamples() const { return fNumLoGainSamples;}68 69 virtual void SetRange (Byte_t hifirst=0, Byte_t hilast=0, Byte_t lofirst=0, Byte_t lolast=0);70 void SetSaturationLimit(Byte_t lim=fgSaturationLimit) { fSaturationLimit = lim; }71 void SetNamePedContainer(const char *name) { fNamePedContainer = name; }62 MExtractor(const char *name=NULL, const char *title=NULL); 63 64 Byte_t GetHiGainFirst() const { return fHiGainFirst; } 65 Byte_t GetHiGainLast () const { return fHiGainLast ; } 66 Byte_t GetLoGainFirst() const { return fLoGainFirst; } 67 Byte_t GetLoGainLast () const { return fLoGainLast ; } 68 Float_t GetNumHiGainSamples() const { return fNumHiGainSamples; } 69 Float_t GetNumLoGainSamples() const { return fNumLoGainSamples; } 70 71 virtual void SetRange ( Byte_t hifirst=0, Byte_t hilast=0, Byte_t lofirst=0, Byte_t lolast=0 ); 72 72 73 ClassDef(MExtractor, 0) // Signal Extractor Base Class 73 void SetSaturationLimit ( Byte_t lim=fgSaturationLimit ) { fSaturationLimit = lim; } 74 void SetNamePedContainer ( const char *name=fgNamePedContainer.Data()) { fNamePedContainer = name; } 75 76 ClassDef(MExtractor, 0) // Signal Extractor Base Class 74 77 }; 75 78
Note:
See TracChangeset
for help on using the changeset viewer.