QwAnalysis
MQwCodaControlEvent.h
Go to the documentation of this file.
1 #ifndef __MQWCODACONTROLEVENT__
2 #define __MQWCODACONTROLEVENT__
3 
4 #include <vector>
5 #include <iostream>
6 #include <Rtypes.h>
7 #include <ctime>
8 #include "TDatime.h"
9 #include "TString.h"
10 
11 ///
12 /// \ingroup QwAnalysis
14 {
15  public:
18 
20  void ProcessControlEvent(UInt_t evtype, UInt_t* buffer);
21  void ReportRunSummary();
22 
23  UInt_t GetStartTime() {return fStartTime;};
24  UInt_t GetPrestartTime() {return fPrestartTime;};
26  UInt_t GetRunType() {return fRunType;};
27 
28  UInt_t GetGoTime(int index = 0);
29  UInt_t GetGoEventCount(int index = 0);
30 
31  UInt_t GetPauseTime(int index = 0);
32  UInt_t GetPauseEventCount(int index = 0);
33 
34  UInt_t GetEndTime() {return fEndTime;};
35  UInt_t GetEndEventCount() {return fEndEventCount;};
36 
37  TString GetStartSQLTime();
38  TString GetEndSQLTime();
39 
40  time_t GetStartUnixTime();
41  time_t GetEndUnixTime();
42 
43 
44  protected:
45  void ProcessSync(UInt_t local_time, UInt_t statuscode);
46  void ProcessPrestart(UInt_t local_time, UInt_t local_runnumber,
47  UInt_t local_runtype);
48  void ProcessGo(UInt_t local_time, UInt_t evt_count);
49  void ProcessPause(UInt_t local_time, UInt_t evt_count);
50  void ProcessEnd(UInt_t local_time, UInt_t evt_count);
51 
52  protected:
53  enum EventTypes{
56  kGO_EVENT = 18,
59  };
60 
61  protected:
63 
64  UInt_t fPrestartTime;
66  UInt_t fRunType;
67 
68  UInt_t fEndTime;
70 
71  UInt_t fNumberPause;
72  std::vector<UInt_t> fPauseEventCount;
73  std::vector<UInt_t> fPauseTime;
74 
75  UInt_t fNumberGo;
76  std::vector<UInt_t> fGoEventCount;
77  std::vector<UInt_t> fGoTime;
78  UInt_t fStartTime;
79 
80  TDatime fPrestartDatime;
81  TDatime fStartDatime;
82  TDatime fEndDatime;
83 };
84 
85 
86 #endif
UInt_t GetGoTime(int index=0)
UInt_t GetPauseTime(int index=0)
std::vector< UInt_t > fGoTime
void ProcessPause(UInt_t local_time, UInt_t evt_count)
void ProcessControlEvent(UInt_t evtype, UInt_t *buffer)
UInt_t GetGoEventCount(int index=0)
UInt_t GetPauseEventCount(int index=0)
void ProcessPrestart(UInt_t local_time, UInt_t local_runnumber, UInt_t local_runtype)
std::vector< UInt_t > fGoEventCount
std::vector< UInt_t > fPauseTime
void ProcessGo(UInt_t local_time, UInt_t evt_count)
void ProcessSync(UInt_t local_time, UInt_t statuscode)
void ProcessEnd(UInt_t local_time, UInt_t evt_count)
std::vector< UInt_t > fPauseEventCount