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

Last change on this file since 4206 was 4206, 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
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 virtual void Copy(TObject& object) const;
51
52 // Getters
53 const Int_t GetAverageAreas () const;
54 MCalibrationPix &GetAverageArea ( UInt_t i );
55 const MCalibrationPix &GetAverageArea ( UInt_t i ) const;
56 MBadPixelsPix &GetAverageBadArea ( UInt_t i );
57 const MBadPixelsPix &GetAverageBadArea ( UInt_t i ) const;
58 MBadPixelsPix &GetAverageBadSector ( UInt_t i );
59 const MBadPixelsPix &GetAverageBadSector ( UInt_t i ) const;
60 MCalibrationPix &GetAverageSector ( UInt_t i );
61 const Int_t GetAverageSectors () const;
62 const MCalibrationPix &GetAverageSector ( UInt_t i ) const;
63 const Float_t GetNumHiGainFADCSlices() const { return fNumHiGainFADCSlices; }
64 const Float_t GetNumLoGainFADCSlices() const { return fNumLoGainFADCSlices; }
65 const Int_t GetNumUnsuitable ( Int_t aidx) const;
66 const Int_t GetNumUnreliable ( Int_t aidx) const;
67
68 virtual Bool_t GetPixelContent ( Double_t &val, Int_t idx,
69 const MGeomCam &cam, Int_t type=0) const;
70 const PulserColor_t GetPulserColor() const { return fPulserColor; }
71 const Int_t GetSize() const;
72
73 MCalibrationPix &operator[] ( UInt_t i );
74 const MCalibrationPix &operator[] ( UInt_t i ) const;
75
76 // Inits
77 virtual void Init ( const MGeomCam &geom );
78 void InitSize ( const UInt_t i );
79 void InitAverageAreas ( const UInt_t i );
80 void InitAverageSectors ( const UInt_t i );
81
82 // Setters
83 void SetNumHiGainFADCSlices ( const Float_t f ) { fNumHiGainFADCSlices = f; }
84 void SetNumLoGainFADCSlices ( const Float_t f ) { fNumLoGainFADCSlices = f; }
85 void SetNumUnsuitable ( const UInt_t i, const Int_t aidx);
86 void SetNumUnreliable ( const UInt_t i, const Int_t aidx);
87 void SetPulserColor ( const PulserColor_t col=kCT1 ) { fPulserColor = col; }
88
89 ClassDef(MCalibrationCam, 1) // Base class Container for Calibration Results Camera
90};
91
92#endif
Note: See TracBrowser for help on using the repository browser.