source: trunk/MagicSoft/Mars/manalysis/MEventRateCalc.h@ 4933

Last change on this file since 4933 was 4887, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 2.0 KB
Line 
1#ifndef MARS_MEventRateCalc
2#define MARS_MEventRateCalc
3
4#ifndef MARS_MTask
5#include "MTask.h"
6#endif
7#ifndef ROOT_TArrayD
8#include <TArrayD.h>
9#endif
10
11class MTime;
12class MEventRate;
13class MParameterD;
14
15class MEventRateCalc : public MTask
16{
17private:
18 static const TString gsDefName; //! Default name of container
19 static const TString gsDefTitle; //! Default title of container
20
21 static const TString gsNameEventRate; //! default name of rate container
22 static const TString gsNameTime; //! Default name of time container
23 static const TString gsNameTimeDiff; //! default name of time-diff container
24 static const TString gsNameTimeRate; //! default name of time-rate container
25
26 static const Int_t gsNumEvents; //! Default number of events
27
28
29 MTime *fTime; //! pointer to event time
30 MTime *fTimeRate; //! pointer to time of event rate
31 MEventRate *fRate; //! pointer to rate storage container
32 MParameterD *fTimeDiff; //! Difference of time between two consecutive events
33
34 TString fNameEventRate; // name of event rate container
35 TString fNameTime; // name of time container
36 TString fNameTimeRate; // name of event rate time container
37 TString fNameTimeDiff; // name of time-diff container
38
39 TArrayD fTimes; //! internal array to store the last n event times
40
41 Int_t PreProcess(MParList *pList);
42 Int_t Process();
43
44 void StreamPrimitive(ofstream &out) const;
45 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
46
47public:
48 MEventRateCalc(const char *name=NULL, const char *title=NULL);
49
50 void SetNumEvents(ULong_t num) { fTimes.Set(num); }
51
52 void SetNameEventRate(const char *name) { fNameEventRate = name; }
53 void SetNameTime(const char *name) { fNameTime = name; }
54 void SetNameTimeDiff(const char *name) { fNameTimeDiff = name; }
55 void SetNameTimeRate(const char *name) { fNameTimeRate = name; }
56
57 ClassDef(MEventRateCalc, 1)// Task to calculate event rates
58};
59
60
61#endif
Note: See TracBrowser for help on using the repository browser.