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

Last change on this file since 8657 was 8490, checked in by tbretz, 18 years ago
*** empty log message ***
File size: 2.6 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
27 void PrintArr(const TCollection &list) const;
28
29public:
30
31 MPedestalCam(const char *name=NULL, const char *title=NULL);
32 ~MPedestalCam();
33
34 void Clear(Option_t *o="");
35 void Copy(TObject &object) const;
36
37 // Getters
38 MPedestalPix &GetAverageArea ( UInt_t i );
39 const MPedestalPix &GetAverageArea ( UInt_t i ) const;
40 const Int_t GetNumAverageArea() const;
41 MPedestalPix &GetAverageSector ( UInt_t i );
42 const MPedestalPix &GetAverageSector ( UInt_t i ) const;
43 const Int_t GetNumAverageSector() const;
44 Float_t GetPedestalMin ( const MGeomCam *cam ) const;
45 Float_t GetPedestalMax ( const MGeomCam *cam ) const;
46 Int_t GetSize () const;
47 ULong_t GetNumSlices() const { return fNumSlices; }
48
49 TArrayF GetAveragedPedPerArea ( const MGeomCam &geom, const UInt_t ai=0, MBadPixelsCam *bad=NULL );
50 TArrayF GetAveragedPedPerSector( const MGeomCam &geom, const UInt_t sec=0, MBadPixelsCam *bad=NULL );
51 TArrayF GetAveragedRmsPerArea ( const MGeomCam &geom, const UInt_t ai=0, MBadPixelsCam *bad=NULL );
52 TArrayF GetAveragedRmsPerSector( const MGeomCam &geom, const UInt_t sec=0, MBadPixelsCam *bad=NULL );
53
54 MPedestalPix &operator[] ( Int_t i );
55 const MPedestalPix &operator[] ( Int_t i ) const;
56
57 void Init ( const MGeomCam &geom);
58 void InitSize ( const UInt_t i );
59 void InitAverageAreas ( const UInt_t i );
60 void InitAverageSectors ( const UInt_t i );
61
62 void Print(Option_t *o="") const;
63
64 // Setters
65 void SetNumSlices(const ULong_t n) { fNumSlices = 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, 2) // Storage Container for all pedestal information of the camera
71};
72
73#endif
Note: See TracBrowser for help on using the repository browser.