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

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