source: trunk/MagicSoft/Mars/mcalib/MCalibrationCam.h@ 4660

Last change on this file since 4660 was 4660, checked in by gaug, 20 years ago
*** empty log message ***
File size: 3.8 KB
Line 
1#ifndef MARS_MCalibrationCam
2#define MARS_MCalibrationCam
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7#ifndef MARS_MCamEvent
8#include "MCamEvent.h"
9#endif
10#ifndef ROOT_TArrayI
11#include "TArrayI.h"
12#endif
13#ifndef ROOT_TArrayF
14#include "TArrayF.h"
15#endif
16
17class TClonesArray;
18
19class MCalibrationPix;
20class MBadPixelsPix;
21class MBadPixelsCam;
22class MGeomCam;
23class MCalibrationCam : public MParContainer, public MCamEvent
24{
25public:
26
27 enum PulserColor_t {
28 kCT1 =0,
29 kGREEN=1,
30 kBLUE =2,
31 kUV =3,
32 kNONE =4
33 }; //! Possible Pulser colours
34
35protected:
36
37 TArrayI fNumUnsuitable; // Number uncalibrated Pixels per area index
38 TArrayI fNumUnreliable; // Number unreliable Pixels per area index
39
40 TArrayF fNumHiGainFADCSlices; // Number High-Gain FADC slices used by extractor
41 TArrayF fNumLoGainFADCSlices; // Number Low -Gain FADC slices used by extractor
42
43 PulserColor_t fPulserColor; // Colour of the pulsed LEDs
44
45 TClonesArray *fPixels; //-> Array of MCalibrationPix, one per pixel
46 TClonesArray *fAverageAreas; //-> Array of MCalibrationPix, one per pixel area
47 TClonesArray *fAverageSectors; //-> Array of MCalibrationPix, one per camera sector
48 TClonesArray *fAverageBadAreas; //-> Array of MBadPixelsPix, one per pixel area
49 TClonesArray *fAverageBadSectors; //-> Array of MBadPixelsPix, one per camera sector
50
51public:
52
53 MCalibrationCam(const char *name=NULL, const char *title=NULL);
54 virtual ~MCalibrationCam();
55
56 virtual void Clear ( Option_t *o="");
57 virtual void DrawPixelContent( Int_t num) const;
58 virtual void Copy(TObject& object) const;
59
60 // Getters
61 const Int_t GetAverageAreas () const;
62 MCalibrationPix &GetAverageArea ( UInt_t i );
63 const MCalibrationPix &GetAverageArea ( UInt_t i ) const;
64 MBadPixelsPix &GetAverageBadArea ( UInt_t i );
65 const MBadPixelsPix &GetAverageBadArea ( UInt_t i ) const;
66 MBadPixelsPix &GetAverageBadSector ( UInt_t i );
67 const MBadPixelsPix &GetAverageBadSector ( UInt_t i ) const;
68 MCalibrationPix &GetAverageSector ( UInt_t i );
69 const Int_t GetAverageSectors () const;
70 const MCalibrationPix &GetAverageSector ( UInt_t i ) const;
71 const Float_t GetNumHiGainFADCSlices ( Int_t aidx=0 ) const;
72 const Float_t GetNumLoGainFADCSlices ( Int_t aidx=0 ) const;
73 const Int_t GetNumUnsuitable ( Int_t aidx ) const;
74 const Int_t GetNumUnreliable ( Int_t aidx ) const;
75
76 virtual Bool_t GetPixelContent ( Double_t &val, Int_t idx,
77 const MGeomCam &cam, Int_t type=0) const;
78 const PulserColor_t GetPulserColor() const { return fPulserColor; }
79 const Int_t GetSize() const;
80
81 MCalibrationPix &operator[] ( UInt_t i );
82 const MCalibrationPix &operator[] ( UInt_t i ) const;
83
84 // Inits
85 virtual void Init ( const MGeomCam &geom );
86 void InitSize ( const UInt_t i );
87 void InitAverageAreas ( const UInt_t i );
88 void InitAverageSectors ( const UInt_t i );
89
90 // Setters
91 void SetNumHiGainFADCSlices ( const Float_t f, const Int_t aidx=0 );
92 void SetNumLoGainFADCSlices ( const Float_t f, const Int_t aidx=0 );
93 void SetNumUnsuitable ( const UInt_t i, const Int_t aidx );
94 void SetNumUnreliable ( const UInt_t i, const Int_t aidx );
95 void SetPulserColor ( const PulserColor_t col=kCT1 ) { fPulserColor = col; }
96
97 ClassDef(MCalibrationCam, 4) // Base class Container for Calibration Results Camera
98};
99
100#endif
Note: See TracBrowser for help on using the repository browser.