source: trunk/MagicSoft/Mars/mhbase/MHn.h@ 9483

Last change on this file since 9483 was 9195, checked in by tbretz, 16 years ago
*** empty log message ***
File size: 2.4 KB
Line 
1#ifndef MARS_MHn
2#define MARS_MHn
3
4#ifndef MARS_MH3
5#include "MH3.h"
6#endif
7
8class MHn : public MH
9{
10public:
11 enum Layout_t { kSimple, kComplex };
12
13protected:
14 MH3 *fHist[6]; // Possible six histograms
15 TString fDrawOption[6]; // Possible corresponding draw options
16
17 Layout_t fLayout; // Specifier for the layout in the canvas
18
19 Int_t fNum; // Number of initialized histograms
20
21 void InitHist();
22
23 Bool_t InitName(Int_t n, const char *name);
24 Bool_t InitTitle(Int_t n, const char *title);
25 Bool_t SetDrawOption(Int_t n, const char *opt);
26
27public:
28 MHn(const char *name=NULL, const char *title=NULL);
29 ~MHn();
30
31 // Setter
32 void SetLayout(Layout_t t) { fLayout = t; }
33 void SetDrawOption(const char *opt) { SetDrawOption(fNum-1, opt); }
34
35 Bool_t AddHist(const char *memberx);
36 Bool_t AddHist(const char *memberx, const char *membery, MH3::Type_t type=MH3::kHistogram);
37 Bool_t AddHist(const char *memberx, const char *membery, const char *memberz, MH3::Type_t type=MH3::kHistogram);
38
39 void InitName(const char *n) { InitName(fNum-1, n); }
40 void InitTitle(const char *t) { InitTitle(fNum-1, t); }
41
42 // General interfact to MH3
43 void SetScale(Double_t x, Double_t y=1, Double_t z=2) const;
44 void SetLog(Bool_t x=kTRUE, Bool_t y=kTRUE, Bool_t z=kTRUE) const;
45 void SetAutoRange(Bool_t x=kTRUE, Bool_t y=kTRUE, Bool_t z=kTRUE) const;
46 void SetBinnings(MBinning *x=0, MBinning *y=0, MBinning *z=0) const;
47 void Sumw2() const;
48
49 // Interface to labels of MH3
50 void InitLabels(MH3::Labels_t labels) const;
51
52 void DefaultLabelX(const char *name=0);
53 void DefaultLabelY(const char *name=0);
54 void DefaultLabelZ(const char *name=0);
55
56 void DefineLabelX(Int_t label, const char *name);
57 void DefineLabelY(Int_t label, const char *name);
58 void DefineLabelZ(Int_t label, const char *name);
59
60 void DefineLabelsX(const TString &labels);
61 void DefineLabelsY(const TString &labels);
62 void DefineLabelsZ(const TString &labels);
63
64 // Set additonal weights for MH3
65 void SetWeight(const char *phrase);
66
67 // MH
68 Bool_t SetupFill(const MParList *pList);
69 Int_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
Note: See TracBrowser for help on using the repository browser.