source: trunk/MagicSoft/Mars/mcalib/MCalibrationIntensityCam.h@ 7388

Last change on this file since 7388 was 7189, checked in by tbretz, 19 years ago
*** empty log message ***
File size: 4.7 KB
Line 
1#ifndef MARS_MCalibrationIntensityCam
2#define MARS_MCalibrationIntensityCam
3
4#ifndef MARS_MCamEvent
5#include "MCamEvent.h"
6#endif
7
8#ifndef MARS_MArrayD
9#include "MArrayD.h"
10#endif
11
12#ifndef MARS_MCalibrationCam
13#include "MCalibrationCam.h"
14#endif
15
16#ifndef ROOT_TOrdCollection
17#include <TOrdCollection.h>
18#endif
19
20class MCalibrationPix;
21class MBadPixelsPix;
22class MGeomCam;
23class MHCalibrationCam;
24
25class MCalibrationIntensityCam : public MParContainer, public MCamEvent
26{
27protected:
28 TOrdCollection *fCams; // Array of MCalibrationCams, one per pulse colour and intensity
29 TOrdCollection *fHists; // Array of MHCalibrationCam's, containing the mean charges per area histograms
30
31 virtual void Add(const UInt_t from, const UInt_t to);
32 virtual void InitSize( const UInt_t n );
33
34public:
35 MCalibrationIntensityCam(const char *name=NULL, const char *title=NULL);
36 ~MCalibrationIntensityCam();
37
38 void Clear ( Option_t *o="" );
39 void Copy(TObject& object) const;
40
41 void AddToList(const char* name, const MGeomCam &geom);
42 void AddHist(const MHCalibrationCam *cam);
43
44 Int_t CountNumEntries(const MCalibrationCam::PulserColor_t col) const;
45
46 const Int_t GetSize() const { return fCams->GetSize(); }
47
48 const Int_t GetAverageAreas () const { return GetCam()->GetAverageAreas(); }
49 MCalibrationPix &GetAverageArea ( UInt_t i ) { return GetCam()->GetAverageArea(i); }
50 const MCalibrationPix &GetAverageArea ( UInt_t i ) const { return GetCam()->GetAverageArea(i); }
51 MBadPixelsPix &GetAverageBadArea ( UInt_t i ) { return GetCam()->GetAverageBadArea(i); }
52 const MBadPixelsPix &GetAverageBadArea ( UInt_t i ) const { return GetCam()->GetAverageBadArea(i); }
53 const Int_t GetAverageSectors () const { return GetCam()->GetAverageSectors(); }
54 MCalibrationPix &GetAverageSector ( UInt_t i ) { return GetCam()->GetAverageSector(i); }
55 const MCalibrationPix &GetAverageSector ( UInt_t i ) const { return GetCam()->GetAverageSector(i); }
56 MBadPixelsPix &GetAverageBadSector ( UInt_t i ) { return GetCam()->GetAverageBadSector(i); }
57 const MBadPixelsPix &GetAverageBadSector ( UInt_t i ) const { return GetCam()->GetAverageBadSector(i); }
58
59 MCalibrationCam *GetCam ( Int_t i=-1) {
60 return static_cast<MCalibrationCam*>(i==-1 ? fCams->Last() : fCams->At(i)); }
61 const MCalibrationCam *GetCam ( Int_t i=-1) const {
62 return static_cast<MCalibrationCam*>(i==-1 ? fCams->Last() : fCams->At(i)); }
63
64 MCalibrationCam *GetCam ( const char *name );
65 const MCalibrationCam *GetCam ( const char *name ) const;
66
67 MHCalibrationCam *GetHist ( Int_t i=-1);
68 const MHCalibrationCam *GetHist ( Int_t i=-1) const;
69
70 MHCalibrationCam *GetHist ( const char *name );
71 const MHCalibrationCam *GetHist ( const char *name ) const;
72
73 MCalibrationPix &operator[] ( UInt_t i );
74 const MCalibrationPix &operator[] ( UInt_t i ) const;
75
76 const Float_t GetNumHiGainFADCSlices ( const Int_t aidx=0 ) const { return GetCam()->GetNumHiGainFADCSlices(aidx); }
77 const Float_t GetNumLoGainFADCSlices ( const Int_t aidx=0 ) const { return GetCam()->GetNumLoGainFADCSlices(aidx); }
78 const Int_t GetNumUnsuitable ( const Int_t aidx=-1) const { return GetCam()->GetNumUnsuitable(aidx); }
79 const Int_t GetNumUnreliable ( const Int_t aidx=-1) const { return GetCam()->GetNumUnreliable(aidx); }
80
81 // Inits
82 void Init ( const MGeomCam &geom );
83
84 // Prints
85 void Print(Option_t *o="") const;
86
87 // Setters
88 void SetNumHiGainFADCSlices( const Float_t f, const Int_t aidx=0) { GetCam()->SetNumHiGainFADCSlices(f,aidx); }
89 void SetNumLoGainFADCSlices( const Float_t f, const Int_t aidx=0) { GetCam()->SetNumLoGainFADCSlices(f,aidx); }
90 void SetNumUnsuitable ( const UInt_t i, const Int_t aidx ) { GetCam()->SetNumUnsuitable(i,aidx); }
91 void SetNumUnreliable ( const UInt_t i, const Int_t aidx ) { GetCam()->SetNumUnreliable(i,aidx); }
92 void SetPulserColor ( const MCalibrationCam::PulserColor_t col=MCalibrationCam::kCT1) {
93 GetCam()->SetPulserColor(col); }
94 void SetCam( MCalibrationCam *cam, const Int_t i) { fCams->PutAt(cam,i); }
95
96 // MCamEvent
97 Bool_t GetPixelContent( Double_t &val, Int_t idx, const MGeomCam &cam,Int_t type=0) const
98 { return GetCam()->GetPixelContent(val,idx,cam,type); }
99 void DrawPixelContent( Int_t num) const;
100
101 ClassDef(MCalibrationIntensityCam, 3) // Base Container Intensity Calibration Results
102};
103
104#endif
Note: See TracBrowser for help on using the repository browser.