source: trunk/MagicSoft/Mars/mpedestal/MPedestalCam.h@ 5245

Last change on this file since 5245 was 4794, checked in by gaug, 20 years ago
*** empty log message ***
File size: 2.7 KB
Line 
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
11class TClonesArray;
12
13class MGeomCam;
14class MPedestalPix;
15class MBadPixelsCam;
16class TArrayF;
17class MPedestalCam : public MParContainer, public MCamEvent
18{
19private:
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
27public:
28
29 MPedestalCam(const char *name=NULL, const char *title=NULL);
30 ~MPedestalCam();
31
32 void Clear(Option_t *o="");
33
34 // Getters
35 MPedestalPix &GetAverageArea ( UInt_t i );
36 const MPedestalPix &GetAverageArea ( UInt_t i ) const;
37 const Int_t GetAverageAreas () const;
38 MPedestalPix &GetAverageSector ( UInt_t i );
39 const MPedestalPix &GetAverageSector ( UInt_t i ) const;
40 const Int_t GetAverageSectors() const;
41 Float_t GetPedestalMin ( const MGeomCam *cam ) const;
42 Float_t GetPedestalMax ( const MGeomCam *cam ) const;
43 Int_t GetSize () const;
44 ULong_t GetTotalEntries () const { return fTotalEntries; }
45
46 TArrayF *GetAveragedPedPerArea ( const MGeomCam &geom, const UInt_t ai=0, MBadPixelsCam *bad=NULL );
47 TArrayF *GetAveragedPedPerSector( const MGeomCam &geom, const UInt_t sec=0, MBadPixelsCam *bad=NULL );
48 TArrayF *GetAveragedRmsPerArea ( const MGeomCam &geom, const UInt_t ai=0, MBadPixelsCam *bad=NULL );
49 TArrayF *GetAveragedRmsPerSector( const MGeomCam &geom, const UInt_t sec=0, MBadPixelsCam *bad=NULL );
50
51 MPedestalPix &operator[] ( Int_t i );
52 const MPedestalPix &operator[] ( Int_t i ) const;
53
54 void Init ( const MGeomCam &geom);
55 void InitSize ( const UInt_t i );
56 void InitAverageAreas ( const UInt_t i );
57 void InitAverageSectors ( const UInt_t i );
58
59 void ReCalc(const MGeomCam &geom, MBadPixelsCam *bad=NULL);
60
61 void Print(Option_t *o="") const;
62
63 // Setters
64 void SetTotalEntries(const ULong_t n) { fTotalEntries = n; }
65
66 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
67 void DrawPixelContent(Int_t idx) const;
68
69 ClassDef(MPedestalCam, 1) // Storage Container for all pedestal information of the camera
70};
71
72#endif
Note: See TracBrowser for help on using the repository browser.