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

Last change on this file since 8888 was 8888, checked in by tbretz, 16 years ago
*** empty log message ***
File size: 1.8 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 *n);
24 Bool_t InitTitle(Int_t n, const char *t);
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)
40 {
41 InitName(fNum-1, n);
42 }
43
44 void InitTitle(const char *t)
45 {
46 InitTitle(fNum-1, t);
47 }
48
49 // Interfact to MH3
50 void SetScale(Double_t x, Double_t y=1, Double_t z=2) const;
51 void SetLog(Bool_t x=kTRUE, Bool_t y=kTRUE, Bool_t z=kTRUE) const;
52 void SetAutoRange(Bool_t x=kTRUE, Bool_t y=kTRUE, Bool_t z=kTRUE) const;
53 void SetBinnings(MBinning *x=0, MBinning *y=0, MBinning *z=0) const;
54 void Sumw2() const;
55
56 // MH
57 Bool_t SetupFill(const MParList *pList);
58 Bool_t Fill(const MParContainer *par, const Stat_t w=1);
59 Bool_t Finalize();
60
61 // TObject
62 //void SetColors() const;
63 void Draw(Option_t *opt=NULL);
64 //void Paint(Option_t *opt="");
65
66 ClassDef(MHn, 1) // Generalized histogram class for up to six histograms
67};
68
69#endif
Note: See TracBrowser for help on using the repository browser.