source: trunk/MagicSoft/Mars/mhvstime/MHVsTime.h@ 4828

Last change on this file since 4828 was 4828, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 1.6 KB
Line 
1#ifndef MARS_MHVsTime
2#define MARS_MHVsTime
3
4#ifndef MARS_MH
5#include "MH.h"
6#endif
7
8class TGraph;
9class MDataChain;
10
11class MHVsTime : public MH
12{
13protected:
14 // Could be const but root < 3.02/06 doesn't like this...
15 TGraph *fGraph; // Histogram to fill
16 MDataChain *fData; // Object from which the data is filled
17 Double_t fScale; // Scale for axis (eg unit)
18 Int_t fMaxPts; // Maximum number of data points
19
20 Int_t fNumEvents; // Number of events to average
21 Double_t fMean; //! Mean value
22 Int_t fN;
23
24
25 enum {
26 kIsLogy = BIT(18),
27 kUseEventNumber = BIT(20)
28 };
29
30 Bool_t fUseEventNumber;
31
32public:
33 MHVsTime(const char *rule=NULL);
34 ~MHVsTime();
35
36 void SetScale(Double_t scale) { fScale = scale; }
37
38 Int_t GetNbins() const;
39
40 void SetName(const char *name);
41 void SetTitle(const char *title);
42
43 Bool_t SetupFill(const MParList *pList);
44 Bool_t Fill(const MParContainer *par, const Stat_t w=1);
45
46 TString GetDataMember() const;
47 TString GetRule() const;
48
49 /*
50 const TH1 *GetHist() const;
51 TH1 *GetHist();
52 TH1 *GetHistByName(const TString name="");
53 */
54 const TGraph *GetGraph() const { return fGraph; }
55 TGraph *GetGraph() { return fGraph; }
56
57 void SetUseEventNumber(Bool_t use = kTRUE) { fUseEventNumber = use; }
58 void SetNumEvents(Int_t n) { fNumEvents=n; }
59
60 void Draw(Option_t *opt=NULL);
61
62 MParContainer *New() const;
63
64 void SetMaxPts(Int_t n) { fMaxPts=n; }
65
66 ClassDef(MHVsTime, 1) // Generalized 1/2/3D-histogram for Mars variables
67};
68
69#endif
Note: See TracBrowser for help on using the repository browser.