source: tags/Mars-V0.10.3/mcalib/MCalibrationIntensityCam.h

Last change on this file was 8140, checked in by tbretz, 18 years ago
*** empty log message ***
File size: 5.2 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() { return static_cast<MCalibrationCam*>(fCams->Last()); }
65 const MCalibrationCam *GetCam() const { return static_cast<MCalibrationCam*>(fCams->Last()); }
66
67// MCalibrationCam *GetCam ( const char *name );
68// const MCalibrationCam *GetCam ( const char *name ) const;
69
70 // The "DeleteOldCam" function must not delete the first entry in
71 // the array because it is a special cam from the MParList. (see above)
72 void DeleteOldCam(MCalibrationCam *cam) { /* if (fCams->IndexOf(cam)>0) delete fCams->Remove(cam);*/ }
73
74 MHCalibrationCam *GetHist ( Int_t i=-1);
75 const MHCalibrationCam *GetHist ( Int_t i=-1) const;
76
77 MHCalibrationCam *GetHist ( const char *name );
78 const MHCalibrationCam *GetHist ( const char *name ) const;
79
80 MCalibrationPix &operator[] ( UInt_t i );
81 const MCalibrationPix &operator[] ( UInt_t i ) const;
82
83 const Float_t GetNumHiGainFADCSlices ( const Int_t aidx=0 ) const { return GetCam()->GetNumHiGainFADCSlices(aidx); }
84 const Float_t GetNumLoGainFADCSlices ( const Int_t aidx=0 ) const { return GetCam()->GetNumLoGainFADCSlices(aidx); }
85 const Int_t GetNumUnsuitable ( const Int_t aidx=-1) const { return GetCam()->GetNumUnsuitable(aidx); }
86 const Int_t GetNumUnreliable ( const Int_t aidx=-1) const { return GetCam()->GetNumUnreliable(aidx); }
87
88 // Inits
89 void Init ( const MGeomCam &geom );
90
91 // Prints
92 void Print(Option_t *o="") const;
93
94 // Setters
95 void SetNumHiGainFADCSlices( const Float_t f, const Int_t aidx=0) { GetCam()->SetNumHiGainFADCSlices(f,aidx); }
96 void SetNumLoGainFADCSlices( const Float_t f, const Int_t aidx=0) { GetCam()->SetNumLoGainFADCSlices(f,aidx); }
97 void SetNumUnsuitable ( const UInt_t i, const Int_t aidx ) { GetCam()->SetNumUnsuitable(i,aidx); }
98 void SetNumUnreliable ( const UInt_t i, const Int_t aidx ) { GetCam()->SetNumUnreliable(i,aidx); }
99 void SetPulserColor ( const MCalibrationCam::PulserColor_t col=MCalibrationCam::kCT1) {
100 GetCam()->SetPulserColor(col); }
101 void SetCam( MCalibrationCam *cam, const Int_t i) { fCams->PutAt(cam,i); }
102
103 // MCamEvent
104 Bool_t GetPixelContent( Double_t &val, Int_t idx, const MGeomCam &cam,Int_t type=0) const
105 { return GetCam()->GetPixelContent(val,idx,cam,type); }
106 void DrawPixelContent( Int_t num) const;
107
108 ClassDef(MCalibrationIntensityCam, 3) // Base Container Intensity Calibration Results
109};
110
111#endif
Note: See TracBrowser for help on using the repository browser.