Diana Software
QDaqCommonDefs.hh
Go to the documentation of this file.
1 
2 #ifndef _Q_DAQ_COMMON_DEFS_HH_
3 #define _Q_DAQ_COMMON_DEFS_HH_
4 
5 #include <string>
11  QInvalid_s = -2,
12  QUnknown_s = -1,
13  QIdle_s = 1,
14  QReady_s = 2,
15  QRunning_s = 3,
16  QStopped_s = 4,
17  QPaused_s = 5,
18  QAskStatus_s = 6,
22  QError_s = 9,
23  QExiting_s = 10,
24  QIgnore_s = 11,
25  QWaiting_s = 12
26 };
27 
28 
35 {
36 public:
40  ProcessStatus_t(const ProcessStatus_& other): fStatus(other) {}
47  { fStatus = type; return *this; }
49  { fStatus = other.fStatus; return *this; }
53  bool operator==(const ProcessStatus_& type) const { return (type == fStatus); }
55  operator ProcessStatus_() const { return fStatus; }
57  std::string AsString() const;
59  bool Set(const std::string& name);
60 
61 private:
63 };
64 
65 
66 
71 enum QDaqState_ {
77  Q_Exiting_State=64
78 };
79 
80 class QDaqState
81 {
82 public:
86  QDaqState(const QDaqState_& other): fDaqState(other) {}
87  QDaqState(const QDaqState& other): fDaqState(other.fDaqState) {}
93  { fDaqState = type; return *this; }
94  QDaqState& operator=(const QDaqState& other)
95  { fDaqState = other.fDaqState; return *this; }
99  bool operator==(const QDaqState_& type) const { return (type == fDaqState); }
101  operator QDaqState_() const { return fDaqState; }
103  std::string AsString() const;
105  bool Set(const std::string& name);
106 private:
108 };
109 #endif
ProcessStatus_
@ QIdle_s
@ QPaused_s
@ QStopped_s
@ QExiting_s
@ QAskStatus_s
@ QError_s
@ QWaiting_s
@ QRunning_s
@ QIgnore_s
@ QReady_s
@ QUnknown_s
@ QTriggerOff_s
@ QTriggerOn_s
@ QInvalid_s
QDaqState_
@ Q_Unknown_State
@ Q_Idle_State
@ Q_Paused_State
@ Q_Invalid_State
@ Q_Running_State
@ Q_Exiting_State
wrapper for ProcessStatus_ enum
ProcessStatus_t & operator=(const ProcessStatus_t &other)
std::string AsString() const
convert to string
bool operator==(const ProcessStatus_ &type) const
comparison operator
ProcessStatus_t(const ProcessStatus_ &other)
ProcessStatus_ fStatus
ProcessStatus_t(const ProcessStatus_t &other)
ProcessStatus_t & operator=(const ProcessStatus_ &type)
assignment operator
bool Set(const std::string &name)
set event type from string
ProcessStatus_t()
constructor
QDaqState(const QDaqState &other)
bool Set(const std::string &name)
set event type from string
bool operator==(const QDaqState_ &type) const
comparison operator
QDaqState()
constructor
QDaqState(const QDaqState_ &other)
QDaqState_ fDaqState
QDaqState & operator=(const QDaqState &other)
std::string AsString() const
convert to string
QDaqState & operator=(const QDaqState_ &type)
assignment operator