CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 {
34 
37  unsigned short boardId;
38  int value;
39 
40  friend std::ostream& operator<<(std::ostream& out, const TempMeasType& m) {
41  std::ostringstream os;
42  os << m.adr << " ";
43  os << DCSBoardUtility(m.board);
44  if (m.board == CFEB) {
45  os << m.boardId;
46  }
47  os << " temp = " << m.value << "oC";
48  return out << os.str();
49  }
50 
52  adr = m.adr;
53  board = m.board;
54  boardId = m.boardId;
55  value = m.value;
56  return *this;
57  }
58 
59 
61 };
62 
66  struct HVVMeasType {
67 
69  unsigned int position;
70  int value;
71 
72  friend std::ostream& operator<<(std::ostream& out, const HVVMeasType& m) {
73  std::ostringstream os;
74  os << m.adr << " ";
75  os << "position:" << m.position;
76  os << " V = " << m.value << "V";
77  return out << os.str();
78  }
79 
81  adr = m.adr;
82  position = m.position;
83  value = m.value;
84  return *this;
85  }
86 
87 
89 };
90 
94  struct LVVMeasType {
95 
98  unsigned int boardId;
99  float nominal_v;
100 
101  friend std::ostream& operator<<(std::ostream& out, const LVVMeasType& m) {
102  std::ostringstream os;
103  os << m.adr << " ";
104  os << DCSBoardUtility(m.board);
105  if (m.board == CFEB) {
106  os << m.boardId;
107  }
108  os << " " << m.nominal_v << "V";
109  return out << os.str();
110  }
111 
113  adr = m.adr;
114  board = m.board;
115  boardId = m.boardId;
116  nominal_v = m.nominal_v;
117  return *this;
118  }
119 
120 
122 };
123 
127  struct LVIMeasType {
128 
131  unsigned int boardId;
132  float nominal_v;
133  float value;
134 
135  friend std::ostream& operator<<(std::ostream& out, const LVIMeasType& m) {
136  std::ostringstream os;
137  os << m.adr << " ";
138  os << DCSBoardUtility(m.board);
139  if (m.board == CFEB) {
140  os << m.boardId;
141  }
142  os << " " << m.nominal_v << "V";
143  os << " " << m.value << "A";
144  return out << os.str();
145  }
146 
148  adr = m.adr;
149  board = m.board;
150  boardId = m.boardId;
151  nominal_v = m.nominal_v;
152  value = m.value;
153  return *this;
154  }
155 
156 
158 };
159 
164  class DCSData {
165 
166  public:
167 
168  DCSData();
169  virtual ~DCSData();
170 
172  std::vector<TempMeasType> temp_meas;
173 
175  std::vector<HVVMeasType> hvv_meas;
176 
178  std::vector<LVVMeasType> lvv_meas;
179 
181  std::vector<LVIMeasType> lvi_meas;
182 
185 
187  int hvv_mode;
188 
190  bool lvv_mode;
191 
193  float lvi_mode;
194 
197 
200 
202  iov = m.iov;
204  temp_meas = m.temp_meas;
205  hvv_meas = m.hvv_meas;
206  lvv_meas = m.lvv_meas;
207  lvi_meas = m.lvi_meas;
208  temp_mode = m.temp_mode;
209  hvv_mode = m.hvv_mode;
210  lvv_mode = m.lvv_mode;
211  lvi_mode = m.lvi_mode;
212  return *this;
213  }
214 
215 
217 };
218 
219 }
220 
221 #endif
222 
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
tuple out
Definition: dbtoconf.py:99
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:30
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)