source: trunk/MagicSoft/Mars/msignal/MExtractor.h@ 4983

Last change on this file since 4983 was 4723, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 3.8 KB
Line 
1#ifndef MARS_MExtractor
2#define MARS_MExtractor
3
4/////////////////////////////////////////////////////////////////////////////
5// //
6// MExtractor //
7// //
8// Base class for the signal extractors //
9// //
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef MARS_MTask
13#include "MTask.h"
14#endif
15
16class MRawEvtData;
17class MRawRunHeader;
18
19class MPedestalCam;
20class MExtractedSignalCam;
21
22class MExtractor : public MTask
23{
24protected:
25
26 static const Byte_t fgSaturationLimit; //! Default for fSaturationLimit (now set to: 254)
27 static const TString fgNamePedestalCam; //! "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 fNamePedestalCam; // 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);
59
60public:
61 MExtractor(const char *name=NULL, const char *title=NULL);
62
63 Byte_t GetHiGainFirst() const { return fHiGainFirst; }
64 Byte_t GetHiGainLast () const { return fHiGainLast ; }
65 Byte_t GetLoGainFirst() const { return fLoGainFirst; }
66 Byte_t GetLoGainLast () const { return fLoGainLast ; }
67 Float_t GetNumHiGainSamples() const { return fNumHiGainSamples; }
68 Float_t GetNumLoGainSamples() const { return fNumLoGainSamples; }
69
70 virtual void SetRange ( Byte_t hifirst=0, Byte_t hilast=0, Byte_t lofirst=0, Byte_t lolast=0 );
71
72 void SetSaturationLimit ( Byte_t lim=fgSaturationLimit ) { fSaturationLimit = lim; }
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
78};
79
80#endif
Note: See TracBrowser for help on using the repository browser.