1 | #ifndef MARS_MHn
|
---|
2 | #define MARS_MHn
|
---|
3 |
|
---|
4 | #ifndef ROOT_TH1
|
---|
5 | #include <TH1.h>
|
---|
6 | #endif
|
---|
7 | #ifndef MARS_MH
|
---|
8 | #include "MH.h"
|
---|
9 | #endif
|
---|
10 |
|
---|
11 | class MH3;
|
---|
12 |
|
---|
13 | class MHn : public MH
|
---|
14 | {
|
---|
15 | public:
|
---|
16 | enum Layout_t { kSimple, kComplex };
|
---|
17 |
|
---|
18 | protected:
|
---|
19 | MH3 *fHist[6]; // Possible six histograms
|
---|
20 | TString fDrawOption[6]; // Possible corresponding draw options
|
---|
21 |
|
---|
22 | Layout_t fLayout; // Specifier for the layout in the canvas
|
---|
23 |
|
---|
24 | Int_t fNum; // Number of initialized histograms
|
---|
25 |
|
---|
26 | void InitHist();
|
---|
27 |
|
---|
28 | Bool_t InitName(Int_t n, const char *n);
|
---|
29 | Bool_t InitTitle(Int_t n, const char *t);
|
---|
30 | Bool_t SetDrawOption(Int_t n, const char *opt);
|
---|
31 |
|
---|
32 | public:
|
---|
33 | MHn(const char *name=NULL, const char *title=NULL);
|
---|
34 | ~MHn();
|
---|
35 |
|
---|
36 | // Setter
|
---|
37 | void SetLayout(Layout_t t) { fLayout = t; }
|
---|
38 |
|
---|
39 | Bool_t AddHist(const char *memberx);
|
---|
40 | Bool_t AddHist(const char *memberx, const char *membery);
|
---|
41 | Bool_t AddHist(const char *memberx, const char *membery, const char *memberz);
|
---|
42 |
|
---|
43 | void SetDrawOption(const char *opt) { SetDrawOption(fNum-1, opt); }
|
---|
44 |
|
---|
45 | void InitName(const char *n)
|
---|
46 | {
|
---|
47 | InitName(fNum-1, n);
|
---|
48 | }
|
---|
49 |
|
---|
50 | void InitTitle(const char *t)
|
---|
51 | {
|
---|
52 | InitTitle(fNum-1, t);
|
---|
53 | }
|
---|
54 |
|
---|
55 | /*
|
---|
56 | void SetScaleX(Double_t scale) { fScale[0] = scale; }
|
---|
57 | void SetScaleY(Double_t scale) { fScale[1] = scale; }
|
---|
58 | void SetScaleZ(Double_t scale) { fScale[2] = scale; }
|
---|
59 |
|
---|
60 | void SetLogx(Bool_t b=kTRUE) { b ? fHist->SetBit(kIsLogx) : fHist->ResetBit(kIsLogx); }
|
---|
61 | void SetLogy(Bool_t b=kTRUE) { b ? fHist->SetBit(kIsLogy) : fHist->ResetBit(kIsLogy); }
|
---|
62 | void SetLogz(Bool_t b=kTRUE) { b ? fHist->SetBit(kIsLogz) : fHist->ResetBit(kIsLogz); }
|
---|
63 |
|
---|
64 | void Sumw2() const { if (fHist) fHist->Sumw2(); }
|
---|
65 | */
|
---|
66 |
|
---|
67 | // MH
|
---|
68 | Bool_t SetupFill(const MParList *pList);
|
---|
69 | Bool_t Fill(const MParContainer *par, const Stat_t w=1);
|
---|
70 | Bool_t Finalize();
|
---|
71 |
|
---|
72 | // TObject
|
---|
73 | //void SetColors() const;
|
---|
74 | void Draw(Option_t *opt=NULL);
|
---|
75 | //void Paint(Option_t *opt="");
|
---|
76 |
|
---|
77 | ClassDef(MHn, 1) // Generalized histogram class for up to six histograms
|
---|
78 | };
|
---|
79 |
|
---|
80 | #endif
|
---|