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

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