1 | #ifndef MARS_MHFadcCam
|
---|
2 | #define MARS_MHFadcCam
|
---|
3 |
|
---|
4 | #ifndef ROOT_TObjArray
|
---|
5 | #include <TObjArray.h>
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | #ifndef MARS_MH
|
---|
9 | #include "MH.h"
|
---|
10 | #endif
|
---|
11 | #ifndef MARS_MHFadcPix
|
---|
12 | #include "MHFadcPix.h"
|
---|
13 | #endif
|
---|
14 |
|
---|
15 | #ifndef ROOT_TH1
|
---|
16 | #include <TH1.h>
|
---|
17 | #endif
|
---|
18 |
|
---|
19 | class MRawEvtData;
|
---|
20 |
|
---|
21 | class MHFadcCam : public MH
|
---|
22 | {
|
---|
23 | private:
|
---|
24 | TObjArray *fArray; //-> List of Lo/Hi gain Histograms
|
---|
25 |
|
---|
26 | // void FillHi(UInt_t ipix, Byte_t data) { (*this)[ipix]->FillHi(data); }
|
---|
27 | // void FillLo(UInt_t ipix, Byte_t data) { (*this)[ipix]->FillLo(data); }
|
---|
28 |
|
---|
29 | Int_t fNumHiGains; //!
|
---|
30 | Int_t fNumLoGains; //!
|
---|
31 |
|
---|
32 | MHFadcPix::Type_t fType; //!
|
---|
33 |
|
---|
34 | public:
|
---|
35 | MHFadcCam(MHFadcPix::Type_t t=MHFadcPix::kValue, const char *name=NULL, const char *title=NULL);
|
---|
36 | ~MHFadcCam();
|
---|
37 |
|
---|
38 | MHFadcPix &operator[](UInt_t i) { return *(MHFadcPix*)(fArray->At(i)); }
|
---|
39 | const MHFadcPix &operator[](UInt_t i) const { return *(MHFadcPix*)(fArray->At(i)); }
|
---|
40 |
|
---|
41 | TH1F *GetHistHi(UInt_t i) { return (*this)[i].GetHistHi(); }
|
---|
42 | TH1F *GetHistLo(UInt_t i) { return (*this)[i].GetHistLo(); }
|
---|
43 |
|
---|
44 | const TH1F *GetHistHi(UInt_t i) const { return (*this)[i].GetHistHi(); }
|
---|
45 | const TH1F *GetHistLo(UInt_t i) const { return (*this)[i].GetHistLo(); }
|
---|
46 |
|
---|
47 | Bool_t Fill(const MParContainer *par, Double_t w=1);
|
---|
48 | Bool_t Fill(const MRawEvtData *par);
|
---|
49 |
|
---|
50 | void ResetHistograms();
|
---|
51 | void Reset(Int_t i);
|
---|
52 |
|
---|
53 | //
|
---|
54 | // FIXME! This should be replaced by a Draw(Option_t)-function
|
---|
55 | //
|
---|
56 | void DrawHi(UInt_t i) { GetHistHi(i)->Draw(); }
|
---|
57 | void DrawLo(UInt_t i) { GetHistLo(i)->Draw(); }
|
---|
58 |
|
---|
59 | Bool_t HasLo(UInt_t i) const { return GetHistLo(i)->GetEntries()>0; }
|
---|
60 | Bool_t HasHi(UInt_t i) const { return GetHistHi(i)->GetEntries()>0; }
|
---|
61 |
|
---|
62 | Bool_t Exists(UInt_t i) const { return HasLo(i) && HasHi(i); }
|
---|
63 |
|
---|
64 | void DrawPix(UInt_t i) { (*this)[i].Draw(); }
|
---|
65 |
|
---|
66 | Int_t GetEntries() const { return fArray->GetEntries(); }
|
---|
67 |
|
---|
68 | TObject *Clone(const char *opt="") const;
|
---|
69 |
|
---|
70 | ClassDef(MHFadcCam, 1) // A list of histograms storing the Fadc spektrum of one pixel
|
---|
71 | };
|
---|
72 |
|
---|
73 | #endif
|
---|
74 |
|
---|