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

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