source: trunk/MagicSoft/Mars/mhist/MHFadcCam.h@ 1770

Last change on this file since 1770 was 1655, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 1.8 KB
Line 
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
19class MRawEvtData;
20
21class MHFadcCam : public MH
22{
23private:
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
34public:
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);
48 Bool_t Fill(const MRawEvtData *par);
49
50 void ResetHistograms();
51
52 //
53 // FIXME! This should be replaced by a Draw(Option_t)-function
54 //
55 void DrawHi(UInt_t i) { GetHistHi(i)->Draw(); }
56 void DrawLo(UInt_t i) { GetHistLo(i)->Draw(); }
57
58 Bool_t HasLo(UInt_t i) const { return GetHistLo(i)->GetEntries()>0; }
59
60 void DrawPix(UInt_t i) { (*this)[i].Draw(); }
61
62 Int_t GetEntries() const { return fArray->GetEntries(); }
63
64 TObject *Clone(const char *opt="") const;
65
66 ClassDef(MHFadcCam, 1) // A list of histograms storing the Fadc spektrum of one pixel
67};
68
69#endif
70
Note: See TracBrowser for help on using the repository browser.