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

Last change on this file since 1476 was 1474, 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();
28 MH3(const char *memberx);
29 MH3(const char *memberx, const char *membery);
30 MH3(const char *memberx, const char *membery, const char *memberz);
31 ~MH3();
32
33 void SetScaleX(Double_t scale) { fScale[0] = scale; }
34 void SetScaleY(Double_t scale) { fScale[1] = scale; }
35 void SetScaleZ(Double_t scale) { fScale[2] = scale; }
36
37 Int_t GetDimension() const { return fDimension; }
38
39 void SetName(const char *name);
40 void SetTitle(const char *title);
41
42 Bool_t SetupFill(const MParList *pList);
43 Bool_t Fill(const MParContainer *par);
44
45 TH1 &GetHist() { return *fHist; }
46 const TH1 &GetHist() const { return *fHist; }
47
48 void Draw(Option_t *opt=NULL);
49 TObject *DrawClone(Option_t *opt=NULL) const;
50
51 void SavePrimitive(ofstream &out, Option_t *o="");
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.