1 | #ifndef MARS_MH3
|
---|
2 | #define MARS_MH3
|
---|
3 |
|
---|
4 | #ifndef ROOT_TH1
|
---|
5 | #include <TH1.h>
|
---|
6 | #endif
|
---|
7 | #ifndef MARS_MH
|
---|
8 | #include "MH.h"
|
---|
9 | #endif
|
---|
10 |
|
---|
11 | class TH1;
|
---|
12 | class TMethodCall;
|
---|
13 | class MDataChain;
|
---|
14 |
|
---|
15 | class MH3 : public MH
|
---|
16 | {
|
---|
17 | protected:
|
---|
18 | // Could be const but root < 3.02/06 doesn't like this...
|
---|
19 | Int_t fDimension; // Number of dimensions of histogram
|
---|
20 | TH1 *fHist; // Histogram to fill
|
---|
21 |
|
---|
22 | TString fDataMember[3]; // Data member which should be filled into the histogram x
|
---|
23 | MDataChain *fData[3]; // Object from which the data is filled
|
---|
24 | Double_t fScale[3];
|
---|
25 |
|
---|
26 | void StreamPrimitive(ofstream &out) const;
|
---|
27 |
|
---|
28 | enum {
|
---|
29 | kIsLogx = BIT(15),
|
---|
30 | kIsLogy = BIT(16),
|
---|
31 | kIsLogz = BIT(17)
|
---|
32 | };
|
---|
33 |
|
---|
34 | public:
|
---|
35 | MH3();
|
---|
36 | MH3(const char *memberx);
|
---|
37 | MH3(const char *memberx, const char *membery);
|
---|
38 | MH3(const char *memberx, const char *membery, const char *memberz);
|
---|
39 | ~MH3();
|
---|
40 |
|
---|
41 | void SetScaleX(Double_t scale) { fScale[0] = scale; }
|
---|
42 | void SetScaleY(Double_t scale) { fScale[1] = scale; }
|
---|
43 | void SetScaleZ(Double_t scale) { fScale[2] = scale; }
|
---|
44 |
|
---|
45 | Int_t GetDimension() const { return fDimension; }
|
---|
46 |
|
---|
47 | void SetName(const char *name);
|
---|
48 | void SetTitle(const char *title);
|
---|
49 |
|
---|
50 | Bool_t SetupFill(const MParList *pList);
|
---|
51 | Bool_t Fill(const MParContainer *par);
|
---|
52 |
|
---|
53 | TString GetDataMember() const;
|
---|
54 |
|
---|
55 | TH1 &GetHist() { return *fHist; }
|
---|
56 | const TH1 &GetHist() const { return *fHist; }
|
---|
57 |
|
---|
58 | TH1 *GetHistByName(const TString name="") { return fHist; }
|
---|
59 |
|
---|
60 | void SetColors() const;
|
---|
61 | void Draw(Option_t *opt=NULL);
|
---|
62 | TObject *DrawClone(Option_t *opt=NULL) const;
|
---|
63 |
|
---|
64 | MParContainer *New() const;
|
---|
65 |
|
---|
66 | ClassDef(MH3, 1) // Generalized 1/2/3D-histogram for Mars variables
|
---|
67 | };
|
---|
68 |
|
---|
69 | #endif
|
---|