1 | #ifndef MARS_MPedestalCam
|
---|
2 | #define MARS_MPedestalCam
|
---|
3 |
|
---|
4 | #ifndef MARS_MParContainer
|
---|
5 | #include "MParContainer.h"
|
---|
6 | #endif
|
---|
7 | #ifndef MARS_MCamEvent
|
---|
8 | #include "MCamEvent.h"
|
---|
9 | #endif
|
---|
10 |
|
---|
11 | class TClonesArray;
|
---|
12 |
|
---|
13 | class MGeomCam;
|
---|
14 | class MPedestalPix;
|
---|
15 | class MBadPixelsCam;
|
---|
16 | class TArrayF;
|
---|
17 | class MPedestalCam : public MParContainer, public MCamEvent
|
---|
18 | {
|
---|
19 | private:
|
---|
20 |
|
---|
21 | TClonesArray *fArray; //-> FIXME: Change TClonesArray away from a pointer?
|
---|
22 | TClonesArray *fAverageAreas; //-> Array of MPedestalPix, one per pixel area
|
---|
23 | TClonesArray *fAverageSectors; //-> Array of MPedestalPix, one per camera sector
|
---|
24 |
|
---|
25 | UInt_t fTotalEntries; // Total number of times, the Process was executed (to estimate the error of pedestal)
|
---|
26 |
|
---|
27 | public:
|
---|
28 |
|
---|
29 | MPedestalCam(const char *name=NULL, const char *title=NULL);
|
---|
30 | ~MPedestalCam();
|
---|
31 |
|
---|
32 | void Clear(Option_t *o="");
|
---|
33 | void Copy(TObject &object) const;
|
---|
34 |
|
---|
35 | // Getters
|
---|
36 | MPedestalPix &GetAverageArea ( UInt_t i );
|
---|
37 | const MPedestalPix &GetAverageArea ( UInt_t i ) const;
|
---|
38 | const Int_t GetAverageAreas () const;
|
---|
39 | MPedestalPix &GetAverageSector ( UInt_t i );
|
---|
40 | const MPedestalPix &GetAverageSector ( UInt_t i ) const;
|
---|
41 | const Int_t GetAverageSectors() const;
|
---|
42 | Float_t GetPedestalMin ( const MGeomCam *cam ) const;
|
---|
43 | Float_t GetPedestalMax ( const MGeomCam *cam ) const;
|
---|
44 | Int_t GetSize () const;
|
---|
45 | ULong_t GetTotalEntries () const { return fTotalEntries; }
|
---|
46 |
|
---|
47 | TArrayF *GetAveragedPedPerArea ( const MGeomCam &geom, const UInt_t ai=0, MBadPixelsCam *bad=NULL );
|
---|
48 | TArrayF *GetAveragedPedPerSector( const MGeomCam &geom, const UInt_t sec=0, MBadPixelsCam *bad=NULL );
|
---|
49 | TArrayF *GetAveragedRmsPerArea ( const MGeomCam &geom, const UInt_t ai=0, MBadPixelsCam *bad=NULL );
|
---|
50 | TArrayF *GetAveragedRmsPerSector( const MGeomCam &geom, const UInt_t sec=0, MBadPixelsCam *bad=NULL );
|
---|
51 |
|
---|
52 | MPedestalPix &operator[] ( Int_t i );
|
---|
53 | const MPedestalPix &operator[] ( Int_t i ) const;
|
---|
54 |
|
---|
55 | void Init ( const MGeomCam &geom);
|
---|
56 | void InitSize ( const UInt_t i );
|
---|
57 | void InitAverageAreas ( const UInt_t i );
|
---|
58 | void InitAverageSectors ( const UInt_t i );
|
---|
59 |
|
---|
60 | void ReCalc(const MGeomCam &geom, MBadPixelsCam *bad=NULL);
|
---|
61 |
|
---|
62 | void Print(Option_t *o="") const;
|
---|
63 |
|
---|
64 | // Setters
|
---|
65 | void SetTotalEntries(const ULong_t n) { fTotalEntries = n; }
|
---|
66 |
|
---|
67 | Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
|
---|
68 | void DrawPixelContent(Int_t idx) const;
|
---|
69 |
|
---|
70 | ClassDef(MPedestalCam, 1) // Storage Container for all pedestal information of the camera
|
---|
71 | };
|
---|
72 |
|
---|
73 | #endif
|
---|