CMS 3D CMS Logo

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;
193  last_change = m.last_change;
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
cscdqm::DCSData::lvv_mode
bool lvv_mode
Definition: CSCDQM_DCSData.h:180
cscdqm::DCSData
CSC DCS Data type.
Definition: CSCDQM_DCSData.h:156
cscdqm::TempMeasType::operator=
TempMeasType & operator=(const TempMeasType &m)
Definition: CSCDQM_DCSData.h:50
cscdqm::DCSData::~DCSData
virtual ~DCSData()
Definition: CSCDQM_DCSData.cc:32
cscdqm::DCSData::lvi_mode
float lvi_mode
Definition: CSCDQM_DCSData.h:183
cscdqm::HVVMeasType::adr
DCSAddressType adr
Definition: CSCDQM_DCSData.h:65
cscdqm::LVIMeasType::adr
DCSAddressType adr
Definition: CSCDQM_DCSData.h:122
cscdqm::LVVMeasType::boardId
unsigned int boardId
Definition: CSCDQM_DCSData.h:93
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
cscdqm::LVIMeasType::boardId
unsigned int boardId
Definition: CSCDQM_DCSData.h:124
cscdqm::TempMeasType
Definition: CSCDQM_DCSData.h:33
cscdqm::LVVMeasType::operator<<
friend std::ostream & operator<<(std::ostream &out, const LVVMeasType &m)
Definition: CSCDQM_DCSData.h:96
cscdqm::DCSBoardUtility
Definition: CSCDQM_DCSBase.h:38
cscdqm::HVVMeasType::position
unsigned int position
Definition: CSCDQM_DCSData.h:66
cscdqm::HVVMeasType
Definition: CSCDQM_DCSData.h:64
CSCDQM_DCSBase.h
cscdqm::TempMeasType::board
DCSBoardType board
Definition: CSCDQM_DCSData.h:35
cscdqm::DCSBoardType
DCSBoardType
Definition: CSCDQM_DCSBase.h:35
cscdqm::LVIMeasType
Definition: CSCDQM_DCSData.h:121
cscdqm::TempMeasType::adr
DCSAddressType adr
Definition: CSCDQM_DCSData.h:34
cscdqm::LVIMeasType::nominal_v
float nominal_v
Definition: CSCDQM_DCSData.h:125
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:79
cscdqm::TimeType
long long TimeType
Definition: CSCDQM_DCSBase.h:32
cscdqm::LVVMeasType
Definition: CSCDQM_DCSData.h:90
cscdqm::DCSData::lvi_meas
std::vector< LVIMeasType > lvi_meas
Definition: CSCDQM_DCSData.h:171
cscdqm::LVVMeasType::adr
DCSAddressType adr
Definition: CSCDQM_DCSData.h:91
cscdqm::LVIMeasType::operator=
LVIMeasType & operator=(const LVIMeasType &m)
Definition: CSCDQM_DCSData.h:140
cscdqm::LVIMeasType::board
DCSBoardType board
Definition: CSCDQM_DCSData.h:123
cscdqm
Definition: CSCDQM_DCSBase.h:29
Serializable.h
value
Definition: value.py:1
cscdqm::DCSData::DCSData
DCSData()
Definition: CSCDQM_DCSData.cc:23
cscdqm::HVVMeasType::operator<<
friend std::ostream & operator<<(std::ostream &out, const HVVMeasType &m)
Definition: CSCDQM_DCSData.h:69
cscdqm::DCSData::hvv_meas
std::vector< HVVMeasType > hvv_meas
Definition: CSCDQM_DCSData.h:165
cscdqm::TempMeasType::value
int value
Definition: CSCDQM_DCSData.h:37
cscdqm::DCSData::iov
TimeType iov
Definition: CSCDQM_DCSData.h:186
cscdqm::DCSData::temp_mode
int temp_mode
Definition: CSCDQM_DCSData.h:174
cscdqm::HVVMeasType::value
int value
Definition: CSCDQM_DCSData.h:67
cscdqm::LVVMeasType::nominal_v
float nominal_v
Definition: CSCDQM_DCSData.h:94
cscdqm::DCSData::lvv_meas
std::vector< LVVMeasType > lvv_meas
Definition: CSCDQM_DCSData.h:168
cscdqm::LVIMeasType::value
float value
Definition: CSCDQM_DCSData.h:126
cscdqm::DCSData::hvv_mode
int hvv_mode
Definition: CSCDQM_DCSData.h:177
cscdqm::DCSData::operator=
DCSData & operator=(const DCSData &m)
Definition: CSCDQM_DCSData.h:191
cscdqm::CFEB
Definition: CSCDQM_DCSBase.h:35
cscdqm::TempMeasType::operator<<
friend std::ostream & operator<<(std::ostream &out, const TempMeasType &m)
Definition: CSCDQM_DCSData.h:39
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
cscdqm::HVVMeasType::operator=
HVVMeasType & operator=(const HVVMeasType &m)
Definition: CSCDQM_DCSData.h:77
cscdqm::DCSData::last_change
TimeType last_change
Definition: CSCDQM_DCSData.h:189
cscdqm::LVVMeasType::board
DCSBoardType board
Definition: CSCDQM_DCSData.h:92
cscdqm::LVIMeasType::operator<<
friend std::ostream & operator<<(std::ostream &out, const LVIMeasType &m)
Definition: CSCDQM_DCSData.h:128
cscdqm::LVVMeasType::operator=
LVVMeasType & operator=(const LVVMeasType &m)
Definition: CSCDQM_DCSData.h:107
cscdqm::DCSData::temp_meas
std::vector< TempMeasType > temp_meas
Definition: CSCDQM_DCSData.h:162
cscdqm::DCSAddressType
Definition: CSCDQM_DCSBase.h:75
cscdqm::TempMeasType::boardId
unsigned short boardId
Definition: CSCDQM_DCSData.h:36