| Line |  | 
|---|
| 1 | #ifndef MARS_MEventRate | 
|---|
| 2 | #define MARS_MEventRate | 
|---|
| 3 |  | 
|---|
| 4 | #ifndef MARS_MParContainer | 
|---|
| 5 | #include "MParContainer.h" | 
|---|
| 6 | #endif | 
|---|
| 7 |  | 
|---|
| 8 | class MEventRate : public MParContainer | 
|---|
| 9 | { | 
|---|
| 10 | private: | 
|---|
| 11 | Double_t fRate;      // [Hz] Event rate | 
|---|
| 12 | UInt_t   fNumEvents; // Number of events correspoding to this rate | 
|---|
| 13 |  | 
|---|
| 14 | public: | 
|---|
| 15 | MEventRate(const char *name=NULL, const char *title=NULL); | 
|---|
| 16 |  | 
|---|
| 17 | void SetRate(Double_t r, UInt_t n) { fRate = r; fNumEvents = n; } | 
|---|
| 18 | Double_t GetRate() const { return fRate; } | 
|---|
| 19 | Double_t GetError() const { return TMath::Sqrt(1./fNumEvents); } | 
|---|
| 20 | UInt_t GetNumEvents() const { return fNumEvents; } | 
|---|
| 21 |  | 
|---|
| 22 | ClassDef(MEventRate, 1) // Storage Container for the event rate | 
|---|
| 23 | }; | 
|---|
| 24 |  | 
|---|
| 25 | #endif | 
|---|
| 26 |  | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.