source: trunk/Mars/manalysis/MEventRateCalc.h@ 11942

Last change on this file since 11942 was 7804, checked in by tbretz, 18 years ago
*** empty log message ***
File size: 2.1 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 fNumFirstEvent; //! Number of first event in file
42
43 Bool_t ReInit(MParList *pList);
44 Int_t PreProcess(MParList *pList);
45 Int_t Process();
46
47 void StreamPrimitive(ostream &out) const;
48 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
49
50public:
51 MEventRateCalc(const char *name=NULL, const char *title=NULL);
52
53 void SetNumEvents(ULong_t num) { fTimes.Set(num); }
54
55 void SetNameEventRate(const char *name) { fNameEventRate = name; }
56 void SetNameTime(const char *name) { fNameTime = name; }
57 void SetNameTimeDiff(const char *name) { fNameTimeDiff = name; }
58 void SetNameTimeRate(const char *name) { fNameTimeRate = name; }
59
60 ClassDef(MEventRateCalc, 1)// Task to calculate event rates
61};
62
63
64#endif
Note: See TracBrowser for help on using the repository browser.