1 | #ifndef MARS_MPedestalSubtractedEvt
|
---|
2 | #define MARS_MPedestalSubtractedEvt
|
---|
3 |
|
---|
4 | #ifndef MARS_MParContainer
|
---|
5 | #include "MParContainer.h"
|
---|
6 | #endif
|
---|
7 | #ifndef MARS_MCamEvent
|
---|
8 | #include "MCamEvent.h"
|
---|
9 | #endif
|
---|
10 | #ifndef MARS_MArrayF
|
---|
11 | #include "MArrayF.h"
|
---|
12 | #endif
|
---|
13 | #ifndef MARS_MArrayB
|
---|
14 | #include "MArrayB.h"
|
---|
15 | #endif
|
---|
16 |
|
---|
17 | class MPedestalSubtractedEvt : public MParContainer, public MCamEvent
|
---|
18 | {
|
---|
19 | private:
|
---|
20 | MArrayF fSamples; // list of all samples with pedestal subtracted
|
---|
21 | MArrayB fSamplesRaw; // list of all samples (raw)
|
---|
22 |
|
---|
23 | UInt_t fNumSamples; // number of samples per pixel
|
---|
24 | UInt_t fNumPixels; // number of pixels
|
---|
25 |
|
---|
26 | public:
|
---|
27 | MPedestalSubtractedEvt(const char *name=NULL, const char *title=NULL)
|
---|
28 | : fNumSamples(0), fNumPixels(0)
|
---|
29 | {
|
---|
30 | }
|
---|
31 |
|
---|
32 | void InitSize(const UInt_t i) { fNumPixels=i; }
|
---|
33 | void InitSamples(UInt_t samples, UInt_t pixels=0);
|
---|
34 |
|
---|
35 | Float_t *GetSamples(UInt_t pixel) const;
|
---|
36 | Byte_t *GetSamplesRaw(UInt_t pixel) const;
|
---|
37 |
|
---|
38 | UInt_t GetNumSamples() const { return fNumSamples; }
|
---|
39 | UShort_t GetNumPixels() const { return fNumPixels; }
|
---|
40 |
|
---|
41 | Int_t GetSaturation(const Int_t idx, Int_t limit, Int_t &first, Int_t &last) const;
|
---|
42 | //void InterpolateSaturation(const Int_t idx, Int_t limit, Int_t first, Int_t last) const;
|
---|
43 | Int_t GetMax(const Int_t pixidx, const Int_t first, const Int_t last, UInt_t &val) const;
|
---|
44 | Int_t GetMax(const Int_t pixidx, const Int_t first, const Int_t last) const
|
---|
45 | {
|
---|
46 | UInt_t val;
|
---|
47 | return GetMax(pixidx, first, last, val);
|
---|
48 | }
|
---|
49 | Int_t GetMax(const Int_t pixidx, UInt_t &val) const
|
---|
50 | {
|
---|
51 | return GetMax(pixidx, 0, fNumSamples-1, val);
|
---|
52 | }
|
---|
53 |
|
---|
54 | Int_t GetMax(const Int_t pixidx) const
|
---|
55 | {
|
---|
56 | UInt_t val;
|
---|
57 | return GetMax(pixidx, 0, fNumSamples-1, val);
|
---|
58 | }
|
---|
59 | Int_t GetSaturation(const Int_t pixidx, Int_t limit) const
|
---|
60 | {
|
---|
61 | Int_t first=0;
|
---|
62 | Int_t last=fNumSamples-1;
|
---|
63 | return GetSaturation(pixidx, limit, first, last);
|
---|
64 | }
|
---|
65 |
|
---|
66 | Int_t GetIntegralRaw(Int_t idx, Int_t first, Int_t last) const
|
---|
67 | {
|
---|
68 | Byte_t *ptr = GetSamplesRaw(idx);
|
---|
69 |
|
---|
70 | const Byte_t *end = ptr + last - first + 1;
|
---|
71 |
|
---|
72 | Int_t sum = 0;
|
---|
73 | while (ptr<end)
|
---|
74 | sum += *ptr++;
|
---|
75 |
|
---|
76 | return sum;
|
---|
77 | }
|
---|
78 |
|
---|
79 | Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const { return kTRUE; }
|
---|
80 | void DrawPixelContent(Int_t num) const { }
|
---|
81 |
|
---|
82 | ClassDef(MPedestalSubtractedEvt, 6) //Container to store the raw Event Data
|
---|
83 | };
|
---|
84 |
|
---|
85 | #endif
|
---|