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 
22 #include <vector>
23 
25 
26 namespace cscdqm {
27 
31  struct TempMeasType {
32 
35  unsigned short boardId;
36  int value;
37 
38  friend std::ostream& operator<<(std::ostream& out, const TempMeasType& m) {
39  std::ostringstream os;
40  os << m.adr << " ";
41  os << DCSBoardUtility(m.board);
42  if (m.board == CFEB) {
43  os << m.boardId;
44  }
45  os << " temp = " << m.value << "oC";
46  return out << os.str();
47  }
48 
50  adr = m.adr;
51  board = m.board;
52  boardId = m.boardId;
53  value = m.value;
54  return *this;
55  }
56 
57  };
58 
62  struct HVVMeasType {
63 
65  unsigned int position;
66  int value;
67 
68  friend std::ostream& operator<<(std::ostream& out, const HVVMeasType& m) {
69  std::ostringstream os;
70  os << m.adr << " ";
71  os << "position:" << m.position;
72  os << " V = " << m.value << "V";
73  return out << os.str();
74  }
75 
77  adr = m.adr;
78  position = m.position;
79  value = m.value;
80  return *this;
81  }
82 
83  };
84 
88  struct LVVMeasType {
89 
92  unsigned int boardId;
93  float nominal_v;
94 
95  friend std::ostream& operator<<(std::ostream& out, const LVVMeasType& m) {
96  std::ostringstream os;
97  os << m.adr << " ";
98  os << DCSBoardUtility(m.board);
99  if (m.board == CFEB) {
100  os << m.boardId;
101  }
102  os << " " << m.nominal_v << "V";
103  return out << os.str();
104  }
105 
107  adr = m.adr;
108  board = m.board;
109  boardId = m.boardId;
110  nominal_v = m.nominal_v;
111  return *this;
112  }
113 
114  };
115 
119  struct LVIMeasType {
120 
123  unsigned int boardId;
124  float nominal_v;
125  float value;
126 
127  friend std::ostream& operator<<(std::ostream& out, const LVIMeasType& m) {
128  std::ostringstream os;
129  os << m.adr << " ";
130  os << DCSBoardUtility(m.board);
131  if (m.board == CFEB) {
132  os << m.boardId;
133  }
134  os << " " << m.nominal_v << "V";
135  os << " " << m.value << "A";
136  return out << os.str();
137  }
138 
140  adr = m.adr;
141  board = m.board;
142  boardId = m.boardId;
143  nominal_v = m.nominal_v;
144  value = m.value;
145  return *this;
146  }
147 
148  };
149 
154  class DCSData {
155 
156  public:
157 
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 
205  };
206 
207 }
208 
209 #endif
210 
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)
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)