source: branches/MarsISDCBranchBasedOn17887/mhist/MHFadcCam.h@ 19921

Last change on this file since 19921 was 2377, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 2.1 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(/*const Int_t n=577,*/ 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 SetupFill(const MParList *pList);
48 Bool_t Fill(const MParContainer *par, const Stat_t w=1);
49 Bool_t Fill(const MRawEvtData *par);
50
51 void ResetHistograms();
52 void ResetEntry(Int_t i);
53
54 //
55 // FIXME! This should be replaced by a Draw(Option_t)-function
56 //
57 void DrawHi(UInt_t i) { GetHistHi(i)->Draw(); }
58 void DrawLo(UInt_t i) { GetHistLo(i)->Draw(); }
59
60 Bool_t HasLo(UInt_t i) const { return GetHistLo(i)->GetEntries()>0; }
61 Bool_t HasHi(UInt_t i) const { return GetHistHi(i)->GetEntries()>0; }
62
63 Bool_t Exists(UInt_t i) const { return HasLo(i) && HasHi(i); }
64
65 void DrawPix(UInt_t i) { (*this)[i].Draw(); }
66
67 Int_t GetEntries() const { return fArray->GetEntries(); }
68
69 TObject *Clone(const char *opt="") const;
70
71 ClassDef(MHFadcCam, 1) // A list of histograms storing the Fadc spektrum of one pixel
72};
73
74#endif
75
Note: See TracBrowser for help on using the repository browser.