source: tags/Mars-V2.4/mhist/MHCamEvent.h

Last change on this file was 9312, checked in by tbretz, 16 years ago
*** empty log message ***
File size: 2.3 KB
Line 
1#ifndef MARS_MHCamEvent
2#define MARS_MHCamEvent
3
4#ifndef MARS_MH
5#include "MH.h"
6#endif
7
8class MHCamera;
9class MCamEvent;
10
11class MHCamEvent : public MH
12{
13private:
14 static const TString gsDefName;
15 static const TString gsDefTitle;
16
17protected:
18 MHCamera *fSum; // storing the sum
19 MHCamera *fErr; //! storing the err
20 MCamEvent *fEvt; //! the current event
21
22 TString fNameEvt; // Name of MCamEvent to fill into histogram
23 TString fNameGeom; // Name of geometry container
24
25 Int_t fType; // Type to used for calling GetPixelContent
26 Bool_t fErrorSpread; // kFALSE==mean, kTRUE==spread
27 Bool_t fErrorRelative; // Display relative error?
28
29 Float_t fThreshold; // Count pixel above/below this threshold
30 Char_t fUseThreshold; // Use a threshold? Which direction has it?
31
32 Int_t fNumReInit; //!
33
34 TString Format(const char *ext) const;
35
36 void Init(const char *name, const char *title);
37 Bool_t InitGeom(const MParList &plist);
38
39 Bool_t SetupFill(const MParList *pList);
40 Bool_t ReInit(MParList *plist);
41 Int_t Fill(const MParContainer *par, const Stat_t w=1);
42
43public:
44 enum { kIsLowerBound=1, kIsUpperBound=-1, kNoBound=0, kCollectMin=-2, kCollectMax=2 };
45
46 MHCamEvent(const char *name=NULL, const char *title=NULL);
47 MHCamEvent(Int_t type, const char *name=NULL, const char *title=NULL);
48 ~MHCamEvent();
49
50 void SetNameEvt(const TString name) { fNameEvt = name; }
51 void SetNameGeom(const TString name) { fNameGeom = name; }
52 void SetType(Int_t type) { fType = type; }
53
54 void SetHist(const MHCamera &cam);
55 MHCamera *GetHist() { return fSum; }
56 const MHCamera *GetHist() const { return fSum; }
57
58 TH1 *GetHistByName(const TString name="") const;
59
60 void Paint(Option_t *o="");
61 void Draw(Option_t *o=""); //*MENU*
62
63 void PrintOutliers(Float_t s) const;
64
65 void SetThreshold(Float_t f=0, Char_t direction=kIsLowerBound) { fThreshold = f; fUseThreshold=direction; }
66 void SetCollectMin() { fUseThreshold=kCollectMin; }
67 void SetCollectMax() { fUseThreshold=kCollectMax; }
68 void SetErrorSpread(Bool_t b=kTRUE) { fErrorSpread = b; }
69 void SetErrorRelative(Bool_t b=kTRUE) { fErrorRelative = b; }
70
71 void RecursiveRemove(TObject *obj);
72
73 ClassDef(MHCamEvent, 2) // Histogram to sum camera events
74};
75
76#endif
Note: See TracBrowser for help on using the repository browser.