source: trunk/MagicSoft/Mars/mhist/MH3.h@ 1379

Last change on this file since 1379 was 1326, checked in by tbretz, 23 years ago
*** empty log message ***
File size: 1.4 KB
Line 
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
11class TH1;
12class TMethodCall;
13class MDataChain;
14
15class MH3 : public MH
16{
17protected:
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
26public:
27 MH3(const char *memberx);
28 MH3(const char *memberx, const char *membery);
29 MH3(const char *memberx, const char *membery, const char *memberz);
30 ~MH3();
31
32 void SetScaleX(Double_t scale) { fScale[0] = scale; }
33 void SetScaleY(Double_t scale) { fScale[1] = scale; }
34 void SetScaleZ(Double_t scale) { fScale[2] = scale; }
35
36 Int_t GetDimension() const { return fDimension; }
37
38 void SetName(const char *name);
39 void SetTitle(const char *title);
40
41 Bool_t SetupFill(const MParList *pList);
42 Bool_t Fill(const MParContainer *par);
43
44 TH1 &GetHist() { return *fHist; }
45 const TH1 &GetHist() const { return *fHist; }
46
47 void Draw(Option_t *opt=NULL);
48 TObject *DrawClone(Option_t *opt=NULL) const;
49
50 ClassDef(MH3, 1) // Generalized 1/2/3D-histogram for Mars variables
51};
52
53#endif
Note: See TracBrowser for help on using the repository browser.