source: trunk/Mars/mpedestal/MPedestalCam.h@ 14597

Last change on this file since 14597 was 8795, checked in by tbretz, 17 years ago
*** empty log message ***
File size: 2.9 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 fNumSlices; // Total number of slices
26 UInt_t fNumEvents; // Number of events used for pedestal calculation (be careful, it has no predefined meaning!)
27
28 void PrintArr(const TCollection &list) const;
29
30public:
31
32 MPedestalCam(const char *name=NULL, const char *title=NULL);
33 ~MPedestalCam();
34
35 // TObject
36 void Clear(Option_t *o="");
37 void Copy(TObject &object) const;
38 void Print(Option_t *o="") const; //*MENU*
39
40 // Getters
41 MPedestalPix &GetAverageArea ( UInt_t i );
42 const MPedestalPix &GetAverageArea ( UInt_t i ) const;
43 const Int_t GetNumAverageArea() const;
44 MPedestalPix &GetAverageSector ( UInt_t i );
45 const MPedestalPix &GetAverageSector ( UInt_t i ) const;
46 const Int_t GetNumAverageSector() const;
47 //Float_t GetPedestalMin ( const MGeomCam *cam ) const;
48 //Float_t GetPedestalMax ( const MGeomCam *cam ) const;
49 Int_t GetSize () const;
50 ULong_t GetNumSlices() const { return fNumSlices; }
51 UInt_t GetNumEvents() const { return fNumEvents; }
52
53 TArrayF GetAveragedPedPerArea ( const MGeomCam &geom, const UInt_t ai=0, MBadPixelsCam *bad=NULL );
54 TArrayF GetAveragedPedPerSector( const MGeomCam &geom, const UInt_t sec=0, MBadPixelsCam *bad=NULL );
55 TArrayF GetAveragedRmsPerArea ( const MGeomCam &geom, const UInt_t ai=0, MBadPixelsCam *bad=NULL );
56 TArrayF GetAveragedRmsPerSector( const MGeomCam &geom, const UInt_t sec=0, MBadPixelsCam *bad=NULL );
57
58 MPedestalPix &operator[] ( Int_t i );
59 const MPedestalPix &operator[] ( Int_t i ) const;
60
61 void Init ( const MGeomCam &geom);
62 void InitSize ( const UInt_t i );
63 void InitAverageAreas ( const UInt_t i );
64 void InitAverageSectors ( const UInt_t i );
65
66 // Setters
67 void SetNumSlices(const ULong_t n) { fNumSlices = n; }
68 void SetNumEvents(const UInt_t n) { fNumEvents = n; }
69
70 // MCamEvent
71 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
72 void DrawPixelContent(Int_t idx) const;
73
74 ClassDef(MPedestalCam, 3) // Storage Container for all pedestal information of the camera
75};
76
77#endif
Note: See TracBrowser for help on using the repository browser.