CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CSCDQM_DCSData.h
Go to the documentation of this file.
1 /*
2  * =====================================================================================
3  *
4  * Filename: CSCDQM_DCSData.h
5  *
6  * Description: CSCDQM DCS Objects
7  *
8  * Version: 1.0
9  * Created: 05/04/2009 11:20:18 AM
10  * Revision: none
11  * Compiler: gcc
12  *
13  * Author: Valdas Rapsevicius (VR), valdas.rapsevicius@cern.ch
14  * Company: CERN, CH
15  *
16  * =====================================================================================
17  */
18 
19 #ifndef CSCDQM_DCSDATA_H
20 #define CSCDQM_DCSDATA_H
21 
23 
24 #include <vector>
25 
27 
28 namespace cscdqm {
29 
33  struct TempMeasType {
36  unsigned short boardId;
37  int value;
38 
39  friend std::ostream& operator<<(std::ostream& out, const TempMeasType& m) {
40  std::ostringstream os;
41  os << m.adr << " ";
42  os << DCSBoardUtility(m.board);
43  if (m.board == CFEB) {
44  os << m.boardId;
45  }
46  os << " temp = " << m.value << "oC";
47  return out << os.str();
48  }
49 
51  adr = m.adr;
52  board = m.board;
53  boardId = m.boardId;
54  value = m.value;
55  return *this;
56  }
57 
59  };
60 
64  struct HVVMeasType {
66  unsigned int position;
67  int value;
68 
69  friend std::ostream& operator<<(std::ostream& out, const HVVMeasType& m) {
70  std::ostringstream os;
71  os << m.adr << " ";
72  os << "position:" << m.position;
73  os << " V = " << m.value << "V";
74  return out << os.str();
75  }
76 
78  adr = m.adr;
79  position = m.position;
80  value = m.value;
81  return *this;
82  }
83 
85  };
86 
90  struct LVVMeasType {
93  unsigned int boardId;
94  float nominal_v;
95 
96  friend std::ostream& operator<<(std::ostream& out, const LVVMeasType& m) {
97  std::ostringstream os;
98  os << m.adr << " ";
99  os << DCSBoardUtility(m.board);
100  if (m.board == CFEB) {
101  os << m.boardId;
102  }
103  os << " " << m.nominal_v << "V";
104  return out << os.str();
105  }
106 
108  adr = m.adr;
109  board = m.board;
110  boardId = m.boardId;
111  nominal_v = m.nominal_v;
112  return *this;
113  }
114 
116  };
117 
121  struct LVIMeasType {
124  unsigned int boardId;
125  float nominal_v;
126  float value;
127 
128  friend std::ostream& operator<<(std::ostream& out, const LVIMeasType& m) {
129  std::ostringstream os;
130  os << m.adr << " ";
131  os << DCSBoardUtility(m.board);
132  if (m.board == CFEB) {
133  os << m.boardId;
134  }
135  os << " " << m.nominal_v << "V";
136  os << " " << m.value << "A";
137  return out << os.str();
138  }
139 
141  adr = m.adr;
142  board = m.board;
143  boardId = m.boardId;
144  nominal_v = m.nominal_v;
145  value = m.value;
146  return *this;
147  }
148 
150  };
151 
156  class DCSData {
157  public:
158  DCSData();
159  virtual ~DCSData();
160 
162  std::vector<TempMeasType> temp_meas;
163 
165  std::vector<HVVMeasType> hvv_meas;
166 
168  std::vector<LVVMeasType> lvv_meas;
169 
171  std::vector<LVIMeasType> lvi_meas;
172 
175 
177  int hvv_mode;
178 
180  bool lvv_mode;
181 
183  float lvi_mode;
184 
187 
190 
192  iov = m.iov;
194  temp_meas = m.temp_meas;
195  hvv_meas = m.hvv_meas;
196  lvv_meas = m.lvv_meas;
197  lvi_meas = m.lvi_meas;
198  temp_mode = m.temp_mode;
199  hvv_mode = m.hvv_mode;
200  lvv_mode = m.lvv_mode;
201  lvi_mode = m.lvi_mode;
202  return *this;
203  }
204 
206  };
207 
208 } // namespace cscdqm
209 
210 #endif
virtual ~DCSData()
TempMeasType & operator=(const TempMeasType &m)
long long TimeType
HVVMeasType & operator=(const HVVMeasType &m)
DCSAddressType adr
DCSAddressType adr
LVVMeasType & operator=(const LVVMeasType &m)
unsigned int boardId
friend std::ostream & operator<<(std::ostream &out, const LVVMeasType &m)
CSC DCS Data type.
std::vector< LVIMeasType > lvi_meas
LVIMeasType & operator=(const LVIMeasType &m)
DCSBoardType board
std::vector< HVVMeasType > hvv_meas
friend std::ostream & operator<<(std::ostream &out, const LVIMeasType &m)
#define COND_SERIALIZABLE
Definition: Serializable.h:39
DCSData & operator=(const DCSData &m)
DCSAddressType adr
std::vector< LVVMeasType > lvv_meas
std::vector< TempMeasType > temp_meas
unsigned short boardId
friend std::ostream & operator<<(std::ostream &out, const TempMeasType &m)
unsigned int boardId
TimeType last_change
DCSAddressType adr
unsigned int position
friend std::ostream & operator<<(std::ostream &out, const HVVMeasType &m)