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

Last change on this file since 4648 was 4609, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 2.3 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;
16
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 MPedestalPix &operator[] ( Int_t i );
47 const MPedestalPix &operator[] ( Int_t i ) const;
48
49 void Init ( const MGeomCam &geom);
50 void InitSize ( const UInt_t i );
51 void InitAverageAreas ( const UInt_t i );
52 void InitAverageSectors ( const UInt_t i );
53
54 void ReCalc(const MGeomCam &geom, MBadPixelsCam *bad=NULL);
55
56 void Print(Option_t *o="") const;
57
58 // Setters
59 void SetTotalEntries(const ULong_t n) { fTotalEntries = n; }
60
61 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
62 void DrawPixelContent(Int_t idx) const;
63
64 ClassDef(MPedestalCam, 1) // Storage Container for all pedestal information of the camera
65};
66
67#endif
Note: See TracBrowser for help on using the repository browser.