Changeset 4723 for trunk/MagicSoft/Mars/msignal
- Timestamp:
- 08/24/04 18:15:29 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/msignal
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/msignal/MExtractFixedWindow.cc
r4340 r4723 282 282 out << ");" << endl; 283 283 } 284 285 void MExtractFixedWindow::Print(Option_t *o) const 286 { 287 *fLog << all; 288 *fLog << GetDescriptor() << ":" << endl; 289 MExtractor::Print(o); 290 } -
trunk/MagicSoft/Mars/msignal/MExtractFixedWindow.h
r4340 r4723 33 33 34 34 void SetRange(Byte_t hifirst=0, Byte_t hilast=0, Byte_t lofirst=0, Byte_t lolast=0); 35 36 void Print(Option_t *o="") const; 35 37 36 ClassDef(MExtractFixedWindow, 0) // Signal Extractor for a fixed extraction window38 ClassDef(MExtractFixedWindow, 1) // Signal Extractor for a fixed extraction window 37 39 }; 38 40 -
trunk/MagicSoft/Mars/msignal/MExtractFixedWindowPeakSearch.cc
r4722 r4723 520 520 return rc; 521 521 } 522 523 void MExtractFixedWindowPeakSearch::Print(Option_t *o) const 524 { 525 *fLog << all; 526 *fLog << GetDescriptor() << ":" << endl; 527 *fLog << " Windows: Hi-Gain=" << (int)fHiGainWindowSize << " Lo-Gain=" << (int)fLoGainWindowSize; 528 *fLog << " Peak-Search=" << (int)fPeakSearchWindowSize << endl; 529 *fLog << " Offset From Window: " << (int)fOffsetFromWindow << endl; 530 *fLog << " Lo-Gain peak Shift: " << (int)fLoGainPeakShift << endl; 531 MExtractor::Print(o); 532 } -
trunk/MagicSoft/Mars/msignal/MExtractFixedWindowPeakSearch.h
r4722 r4723 45 45 46 46 void SetLoGainPeakShift(Byte_t shift=fgLoGainPeakShift) { fLoGainPeakShift = shift; } 47 48 ClassDef(MExtractFixedWindowPeakSearch, 0) // Signal Extractor for fixed size trigger-corrected extraction window 47 48 void Print(Option_t *o="") const; 49 50 ClassDef(MExtractFixedWindowPeakSearch, 1) // Signal Extractor for fixed size trigger-corrected extraction window 49 51 }; 50 52 -
trunk/MagicSoft/Mars/msignal/MExtractSlidingWindow.h
r4340 r4723 32 32 Byte_t windowl=fgLoGainWindowSize); 33 33 34 ClassDef(MExtractSlidingWindow, 0) // Signal Extractor for sliding extraction window34 ClassDef(MExtractSlidingWindow, 1) // Signal Extractor for sliding extraction window 35 35 }; 36 36 -
trunk/MagicSoft/Mars/msignal/MExtractTime.cc
r4608 r4723 69 69 70 70 using namespace std; 71 71 72 const Float_t MExtractTime::fgOffsetLoGain = 1.51; // 5 ns 73 72 74 // -------------------------------------------------------------------------- 73 75 // … … 83 85 // 84 86 MExtractTime::MExtractTime(const char *name, const char *title) 85 : fArrTime(NULL) , fNamePedContainer("MPedestalCam")87 : fArrTime(NULL) 86 88 { 87 89 … … 108 110 Int_t MExtractTime::PreProcess(MParList *pList) 109 111 { 110 111 112 fRawEvt = (MRawEvtData*)pList->FindObject(AddSerialNumber("MRawEvtData")); 112 113 if (!fRawEvt) … … 129 130 130 131 131 fPedestals = (MPedestalCam*)pList->FindObject( AddSerialNumber(fNamePed Container), "MPedestalCam");132 fPedestals = (MPedestalCam*)pList->FindObject( AddSerialNumber(fNamePedestalCam), "MPedestalCam"); 132 133 if (!fPedestals) 133 134 { … … 214 215 } 215 216 217 // -------------------------------------------------------------------------- 218 // 219 // In addition to the resources of the base-class MExtractor: 220 // MJPedestal.MExtractor.OffsetLoGain: 1.51 221 // 222 Int_t MExtractTime::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 223 { 224 Bool_t rc = kFALSE; 225 226 if (IsEnvDefined(env, prefix, "OffsetLoGain", print)) 227 { 228 fOffsetLoGain = GetEnvValue(env, prefix, "OffsetLoGain", fOffsetLoGain); 229 rc = kTRUE; 230 } 231 232 rc = MExtractor::ReadEnv(env, prefix, print) ? kTRUE : rc; 233 234 return rc; 235 } 236 237 void MExtractTime::Print(Option_t *o) const 238 { 239 *fLog << all; 240 if (IsA()==MExtractTime::Class()) 241 *fLog << GetDescriptor() << ":" << endl; 242 *fLog << " Offset Lo-Gain=" << fOffsetLoGain << endl; 243 MExtractor::Print(o); 244 } -
trunk/MagicSoft/Mars/msignal/MExtractTime.h
r4586 r4723 8 8 class MPedestalPix; 9 9 class MArrivalTimeCam; 10 10 11 class MExtractTime : public MExtractor 11 12 { 12 13 private: 13 14 static const Float_t fgOffsetLoGain; // Default for fOffsetLoGain (now set to 1.51 (= 5ns) 14 15 16 Int_t PreProcess(MParList *pList); 17 Bool_t ReInit(MParList *pList); 18 Int_t Process(); 19 15 20 protected: 21 Float_t fOffsetLoGain; // Offset of the low-gain signal w.r.t. the High-Gain slices 16 22 17 Float_t fOffsetLoGain; // Offset of the low-gain signal w.r.t. the High-Gain slices 18 19 MArrivalTimeCam *fArrTime; // Container with the photons arrival times 20 TString fNamePedContainer; // name of the 'MPedestalCam' container 23 MArrivalTimeCam *fArrTime; //! Container with the photons arrival times 21 24 22 23 virtual Int_t PreProcess(MParList *pList);24 virtual Bool_t ReInit(MParList *pList);25 virtual Int_t Process();26 27 25 virtual void FindTimeHiGain(Byte_t *firstused, Float_t &time, Float_t &dtime, 28 26 Byte_t &sat, const MPedestalPix &ped) const; … … 30 28 Byte_t &sat, const MPedestalPix &ped) const; 31 29 30 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print); 31 32 32 public: 33 34 33 MExtractTime(const char *name=NULL, const char *title=NULL); 35 34 36 35 void SetOffsetLoGain( const Float_t f=fgOffsetLoGain) { fOffsetLoGain = f; } 37 void SetNamePedContainer(const char *name) { fNamePedContainer = name; }38 36 39 40 ClassDef(MExtractTime, 0) // Arrival Time Extractor Base Class 37 void Print(Option_t *o) const; 38 39 ClassDef(MExtractTime, 1) // Arrival Time Extractor Base Class 41 40 }; 42 41 43 42 #endif 44 45 46 -
trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.h
r4260 r4723 9 9 class MExtractTimeAndCharge : public MExtractTime 10 10 { 11 private: 12 Int_t PreProcess(MParList *pList); 13 Bool_t ReInit(MParList *pList); 14 Int_t Process(); 15 11 16 protected: 12 13 virtual Int_t PreProcess(MParList *pList);14 virtual Bool_t ReInit(MParList *pList);15 virtual Int_t Process();16 17 17 virtual void FindTimeAndChargeHiGain(Byte_t *firstused, Byte_t *logain, Float_t &sum, Float_t &dsum, 18 18 Float_t &time, Float_t &dtime, -
trunk/MagicSoft/Mars/msignal/MExtractTimeFastSpline.h
r4284 r4723 7 7 8 8 class MPedestalPix; 9 9 10 class MExtractTimeFastSpline : public MExtractTime 10 11 { 11 12 private: 12 13 static const Byte_t fgHiGainFirst; // Default for fHiGainFirst (now set to: 2) 13 14 static const Byte_t fgHiGainLast; // Default for fHiGainLast (now set to: 14) -
trunk/MagicSoft/Mars/msignal/MExtractTimeHighestIntegral.cc
r4722 r4723 324 324 SetWindowSize(hw, lw); 325 325 326 rc = MExtract or::ReadEnv(env, prefix, print) ? kTRUE : rc;326 rc = MExtractTime::ReadEnv(env, prefix, print) ? kTRUE : rc; 327 327 328 328 return rc; 329 329 } 330 331 void MExtractTimeHighestIntegral::Print(Option_t *o) const 332 { 333 *fLog << all; 334 *fLog << GetDescriptor() << ":" << endl; 335 *fLog << " Windows: Hi-Gain=" << (int)fHiGainWindowSize << " Lo-Gain=" << (int)fLoGainWindowSize << endl; 336 MExtractTime::Print(o); 337 } -
trunk/MagicSoft/Mars/msignal/MExtractTimeHighestIntegral.h
r4722 r4723 9 9 { 10 10 private: 11 12 11 static const Byte_t fgHiGainFirst; 13 12 static const Byte_t fgHiGainLast; … … 34 33 Byte_t windowl=fgLoGainWindowSize); 35 34 36 ClassDef(MExtractTimeHighestIntegral, 0) // Task to Extract the Arrival Times As the mean time of the fWindowSize time slices 35 void Print(Option_t *o="") const; 36 37 ClassDef(MExtractTimeHighestIntegral, 1) // Task to Extract the Arrival Times As the mean time of the fWindowSize time slices 37 38 }; 38 39 -
trunk/MagicSoft/Mars/msignal/MExtractTimeSpline.h
r3943 r4723 7 7 8 8 class MPedestalPix; 9 9 10 class MExtractTimeSpline : public MExtractTime 10 11 { 11 12 private: 12 13 static const Byte_t fgHiGainFirst; 13 14 static const Byte_t fgHiGainLast; -
trunk/MagicSoft/Mars/msignal/MExtractor.cc
r4615 r4723 42 42 // setup file. For more information see ReadEnv and MEvtLoop::ReadEnv 43 43 // 44 // 45 // IMPORTANT: For all classes you derive from MExtractor make sure that: 46 // - Print() is correctly implemented 47 // - Clone() works 48 // - Class Version number != 0 and the I/O works PERFECTLY 49 // - only data members which are necessary for the setup (not the ones 50 // created in PreProcess and Process) are written 51 // - the version number is maintained! 52 // 53 // 44 54 // Input Containers: 45 55 // MRawEvtData … … 75 85 76 86 const Byte_t MExtractor::fgSaturationLimit = 254; 77 const TString MExtractor::fgNamePedContainer = "MPedestalCam"; 87 const TString MExtractor::fgNamePedestalCam = "MPedestalCam"; 88 78 89 // -------------------------------------------------------------------------- 79 90 // … … 84 95 // - all variables to 0 85 96 // - fSaturationLimit to fgSaturationLimit 86 // - fNamePed Container to fgNamePedContainer97 // - fNamePedestalCam to fgNamePedestalCam 87 98 // 88 99 // Call: … … 98 109 AddToBranchList("MRawEvtData.*"); 99 110 100 SetNamePed Container();111 SetNamePedestalCam(); 101 112 SetRange(); 102 113 SetSaturationLimit(); … … 141 152 142 153 154 fPedestals = (MPedestalCam*)pList->FindObject(AddSerialNumber(fNamePedestalCam), "MPedestalCam"); 155 if (!fPedestals) 156 { 157 *fLog << err << AddSerialNumber("MPedestalCam") << " not found... aborting" << endl; 158 return kFALSE; 159 } 160 143 161 fSignals = (MExtractedSignalCam*)pList->FindCreateObj(AddSerialNumber("MExtractedSignalCam")); 144 162 if (!fSignals) 145 163 return kFALSE; 146 147 fPedestals = (MPedestalCam*)pList->FindObject(AddSerialNumber(fNamePedContainer), "MPedestalCam");148 if (!fPedestals)149 {150 *fLog << err << AddSerialNumber("MPedestalCam") << " not found... aborting" << endl;151 return kFALSE;152 }153 164 154 165 return kTRUE; … … 363 374 return rc; 364 375 } 376 377 void MExtractor::Print(Option_t *o) const 378 { 379 *fLog << all; 380 381 if (IsA()==MExtractor::Class()) 382 *fLog << GetDescriptor() << ":" << endl; 383 384 *fLog << " Hi Gain Range: " << (int)fHiGainFirst << " " << (int)fHiGainLast << endl; 385 *fLog << " Lo Gain Range: " << (int)fLoGainFirst << " " << (int)fLoGainLast << endl; 386 *fLog << " Saturation Lim: " << (int)fSaturationLimit << endl; 387 } -
trunk/MagicSoft/Mars/msignal/MExtractor.h
r4615 r4723 25 25 26 26 static const Byte_t fgSaturationLimit; //! Default for fSaturationLimit (now set to: 254) 27 static const TString fgNamePed Container; //! "MPedestalCam"27 static const TString fgNamePedestalCam; //! "MPedestalCam" 28 28 29 29 MPedestalCam *fPedestals; //! Pedestals of all pixels in the camera 30 MExtractedSignalCam *fSignals; // 30 MExtractedSignalCam *fSignals; //! Extracted signal of all pixels in the camera 31 31 32 32 MRawEvtData *fRawEvt; //! Raw event data (time slices) … … 47 47 48 48 Byte_t fSaturationLimit; // Highest FADC slice value until being declared saturated 49 TString fNamePed Container; // Name of the 'MPedestalCam' container49 TString fNamePedestalCam; // Name of the 'MPedestalCam' container 50 50 51 51 virtual void FindSignalHiGain(Byte_t *firstused, Byte_t *lowgain, Float_t &sum, Byte_t &sat) const { } … … 59 59 60 60 public: 61 62 61 MExtractor(const char *name=NULL, const char *title=NULL); 63 62 … … 72 71 73 72 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 73 void SetNamePedestalCam ( const char *name=fgNamePedestalCam.Data()) { fNamePedestalCam = name; } 74 75 void Print(Option_t *o="") const; 76 77 ClassDef(MExtractor, 1) // Signal Extractor Base Class 77 78 }; 78 79
Note:
See TracChangeset
for help on using the changeset viewer.