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 |
|
---|
16 | class MRawEvtData;
|
---|
17 | class MRawRunHeader;
|
---|
18 |
|
---|
19 | class MPedestalCam;
|
---|
20 | class MExtractedSignalCam;
|
---|
21 |
|
---|
22 | class MExtractor : public MTask
|
---|
23 | {
|
---|
24 | protected:
|
---|
25 | static const Byte_t fgSaturationLimit;
|
---|
26 |
|
---|
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 | Bool_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
|
---|
58 |
|
---|
59 | public:
|
---|
60 | MExtractor(const char *name=NULL, const char *title=NULL);
|
---|
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; }
|
---|
72 |
|
---|
73 | ClassDef(MExtractor, 0) // Signal Extractor Base Class
|
---|
74 | };
|
---|
75 |
|
---|
76 | #endif
|
---|