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

Last change on this file since 5559 was 5558, checked in by tbretz, 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 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 GetNumAverageArea() const;
39 MPedestalPix &GetAverageSector ( UInt_t i );
40 const MPedestalPix &GetAverageSector ( UInt_t i ) const;
41 const Int_t GetNumAverageSector() 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 Print(Option_t *o="") const;
61
62 // Setters
63 void SetTotalEntries(const ULong_t n) { fTotalEntries = n; }
64
65 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
66 void DrawPixelContent(Int_t idx) const;
67
68 ClassDef(MPedestalCam, 1) // Storage Container for all pedestal information of the camera
69};
70
71#endif
Note: See TracBrowser for help on using the repository browser.