source: trunk/MagicSoft/Mars/mtemp/mifae/library/MLiveTime.h@ 4800

Last change on this file since 4800 was 4429, checked in by jlopez, 20 years ago
*** empty log message ***
File size: 1.3 KB
Line 
1#ifndef MARS_MLiveTime
2#define MARS_MLiveTime
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7
8#ifndef ROOT_TArrayD
9#include <TArrayD.h>
10#endif
11
12class MLiveTime : public MParContainer
13{
14 private:
15
16 UInt_t fNumberTimeBins;
17 TArrayD fLiveTimeBin;
18 TArrayD fMeanRealTimeBin;
19 TArrayD fWidthRealTimeBin;
20
21 void Set(UInt_t numberbins);
22
23 public:
24
25 MLiveTime(UInt_t numberbins = 1, const char *name=NULL, const char *title=NULL);
26 //~MLiveTime;
27
28 void AddBin() { Set(fNumberTimeBins+1); }
29 void AddTime(Double_t time) { fLiveTimeBin[fNumberTimeBins-1]+=time; }
30 void SetRealTime (Double_t mean, Double_t width)
31 {
32 fMeanRealTimeBin[fNumberTimeBins-1]=mean;
33 fWidthRealTimeBin[fNumberTimeBins-1]=width;
34 }
35
36 UInt_t GetNumberTimeBins() { return fNumberTimeBins;}
37 Double_t GetLiveTime() { return fLiveTimeBin[fNumberTimeBins-1]; }
38 Double_t GetMeanRealTime() { return fMeanRealTimeBin[fNumberTimeBins-1]; }
39 Double_t GetWidthRealTime() { return fWidthRealTimeBin[fNumberTimeBins-1]; }
40
41 TArrayD& GetLiveTimeTArray() { return fLiveTimeBin; }
42 TArrayD& GetMeanRealTimeTArray() { return fMeanRealTimeBin; }
43 TArrayD& GetWidthRealTimeTArray() { return fWidthRealTimeBin; }
44
45 void Print(const Option_t*) const;
46
47 ClassDef(MLiveTime, 1) // Storage for the live time extracted from real data
48
49};
50
51#endif
Note: See TracBrowser for help on using the repository browser.