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

Last change on this file since 1502 was 1481, checked in by tbretz, 22 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
26 void StreamPrimitive(ofstream &out) const;
27
28public:
29 MH3();
30 MH3(const char *memberx);
31 MH3(const char *memberx, const char *membery);
32 MH3(const char *memberx, const char *membery, const char *memberz);
33 ~MH3();
34
35 void SetScaleX(Double_t scale) { fScale[0] = scale; }
36 void SetScaleY(Double_t scale) { fScale[1] = scale; }
37 void SetScaleZ(Double_t scale) { fScale[2] = scale; }
38
39 Int_t GetDimension() const { return fDimension; }
40
41 void SetName(const char *name);
42 void SetTitle(const char *title);
43
44 Bool_t SetupFill(const MParList *pList);
45 Bool_t Fill(const MParContainer *par);
46
47 TH1 &GetHist() { return *fHist; }
48 const TH1 &GetHist() const { return *fHist; }
49
50 void Draw(Option_t *opt=NULL);
51 TObject *DrawClone(Option_t *opt=NULL) const;
52
53 ClassDef(MH3, 1) // Generalized 1/2/3D-histogram for Mars variables
54};
55
56#endif
Note: See TracBrowser for help on using the repository browser.