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  };
52 
56  struct HVVMeasType {
58  unsigned int position;
59  int value;
60 
61  friend std::ostream& operator<<(std::ostream& out, const HVVMeasType& m) {
62  std::ostringstream os;
63  os << m.adr << " ";
64  os << "position:" << m.position;
65  os << " V = " << m.value << "V";
66  return out << os.str();
67  }
68 
70  };
71 
75  struct LVVMeasType {
78  unsigned int boardId;
79  float nominal_v;
80 
81  friend std::ostream& operator<<(std::ostream& out, const LVVMeasType& m) {
82  std::ostringstream os;
83  os << m.adr << " ";
84  os << DCSBoardUtility(m.board);
85  if (m.board == CFEB) {
86  os << m.boardId;
87  }
88  os << " " << m.nominal_v << "V";
89  return out << os.str();
90  }
91 
93  };
94 
98  struct LVIMeasType {
101  unsigned int boardId;
102  float nominal_v;
103  float value;
104 
105  friend std::ostream& operator<<(std::ostream& out, const LVIMeasType& m) {
106  std::ostringstream os;
107  os << m.adr << " ";
108  os << DCSBoardUtility(m.board);
109  if (m.board == CFEB) {
110  os << m.boardId;
111  }
112  os << " " << m.nominal_v << "V";
113  os << " " << m.value << "A";
114  return out << os.str();
115  }
116 
118  };
119 
124  class DCSData {
125  public:
126  DCSData();
127  virtual ~DCSData();
128 
130  std::vector<TempMeasType> temp_meas;
131 
133  std::vector<HVVMeasType> hvv_meas;
134 
136  std::vector<LVVMeasType> lvv_meas;
137 
139  std::vector<LVIMeasType> lvi_meas;
140 
143 
145  int hvv_mode;
146 
148  bool lvv_mode;
149 
151  float lvi_mode;
152 
155 
158 
160  iov = m.iov;
161  last_change = m.last_change;
162  temp_meas = m.temp_meas;
163  hvv_meas = m.hvv_meas;
164  lvv_meas = m.lvv_meas;
165  lvi_meas = m.lvi_meas;
166  temp_mode = m.temp_mode;
167  hvv_mode = m.hvv_mode;
168  lvv_mode = m.lvv_mode;
169  lvi_mode = m.lvi_mode;
170  return *this;
171  }
172 
174  };
175 
176 } // namespace cscdqm
177 
178 #endif
virtual ~DCSData()
long long TimeType
DCSAddressType adr
DCSAddressType adr
unsigned int boardId
friend std::ostream & operator<<(std::ostream &out, const LVVMeasType &m)
CSC DCS Data type.
std::vector< LVIMeasType > lvi_meas
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)