1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
|
/**
* \class L1GtBoardMaps
*
*
* Description: map of the L1 GT boards.
*
* Implementation:
* <TODO: enter implementation details>
*
* \author: Vasile Mihai Ghete - HEPHY Vienna
*
* $Date$
* $Revision$
*
*/
// this class header
#include "CondFormats/L1TObjects/interface/L1GtBoardMaps.h"
// system include files
#include <iostream>
#include <iomanip>
// user include files
// forward declarations
// constructor
L1GtBoardMaps::L1GtBoardMaps() {
// empty
}
// destructor
L1GtBoardMaps::~L1GtBoardMaps() {
// empty
}
// set / print the L1 GT board map
void L1GtBoardMaps::setGtBoardMaps(const std::vector<L1GtBoard>& gtBoardMapsValue) { m_gtBoardMaps = gtBoardMapsValue; }
void L1GtBoardMaps::print(std::ostream& myCout) const {
myCout << "\nL1 GT board map" << std::endl;
myCout << " Size: " << m_gtBoardMaps.size() << " boards in L1 GT." << std::endl;
for (std::vector<L1GtBoard>::const_iterator cIt = m_gtBoardMaps.begin(); cIt != m_gtBoardMaps.end(); ++cIt) {
cIt->print(myCout);
myCout << std::endl;
}
myCout << std::endl;
}
// print L1 GT DAQ record map
void L1GtBoardMaps::printGtDaqRecordMap(std::ostream& myCout) const {
myCout << "\nL1 GT DAQ record map" << std::endl;
int nrBoards = 0;
int posRec = -1;
uint16_t boardId = 0;
std::string boardName;
for (std::vector<L1GtBoard>::const_iterator cIt = m_gtBoardMaps.begin(); cIt != m_gtBoardMaps.end(); ++cIt) {
posRec = cIt->gtPositionDaqRecord();
boardId = cIt->gtBoardId();
boardName = cIt->gtBoardName();
if (posRec >= 0) {
myCout << " " << boardName << " " << std::hex << boardId << std::dec << " at position " << posRec << std::endl;
nrBoards++;
}
}
myCout << "\n Size: " << nrBoards << " boards in the record" << std::endl;
myCout << " Header and trailer are automatically added to the hardware record.\n" << std::endl;
myCout << std::endl;
}
// print L1 GT EVM record map
void L1GtBoardMaps::printGtEvmRecordMap(std::ostream& myCout) const {
myCout << "\nL1 GT EVM record map" << std::endl;
int nrBoards = 0;
int posRec = -1;
uint16_t boardId = 0;
std::string boardName;
for (std::vector<L1GtBoard>::const_iterator cIt = m_gtBoardMaps.begin(); cIt != m_gtBoardMaps.end(); ++cIt) {
posRec = cIt->gtPositionEvmRecord();
boardId = cIt->gtBoardId();
boardName = cIt->gtBoardName();
if (posRec >= 0) {
myCout << " " << boardName << " " << std::hex << boardId << std::dec << " at position " << posRec << std::endl;
nrBoards++;
}
}
myCout << "\n Size: " << nrBoards << " boards in the record" << std::endl;
myCout << " Header and trailer are automatically added to the hardware record.\n" << std::endl;
myCout << std::endl;
}
// print L1 GT active boards map for DAQ record
void L1GtBoardMaps::printGtDaqActiveBoardsMap(std::ostream& myCout) const {
myCout << "\nL1 GT DAQ \"active boards\" record map" << std::endl;
int nrBoards = 0;
int posRec = -1;
uint16_t boardId = 0;
std::string boardName;
for (std::vector<L1GtBoard>::const_iterator cIt = m_gtBoardMaps.begin(); cIt != m_gtBoardMaps.end(); ++cIt) {
posRec = cIt->gtBitDaqActiveBoards();
boardId = cIt->gtBoardId();
boardName = cIt->gtBoardName();
if (posRec >= 0) {
myCout << " " << boardName << " " << std::hex << boardId << std::dec << " at bit " << posRec << std::endl;
nrBoards++;
}
}
myCout << "\n Size: " << nrBoards << " boards in the record" << std::endl;
myCout << std::endl;
myCout << std::endl;
}
// print L1 GT active boards map for EVM record
void L1GtBoardMaps::printGtEvmActiveBoardsMap(std::ostream& myCout) const {
myCout << "\nL1 GT EVM \"active boards\" record map" << std::endl;
int nrBoards = 0;
int posRec = -1;
uint16_t boardId = 0;
std::string boardName;
for (std::vector<L1GtBoard>::const_iterator cIt = m_gtBoardMaps.begin(); cIt != m_gtBoardMaps.end(); ++cIt) {
posRec = cIt->gtBitEvmActiveBoards();
boardId = cIt->gtBoardId();
boardName = cIt->gtBoardName();
if (posRec >= 0) {
myCout << " " << boardName << " " << std::hex << boardId << std::dec << " at bit " << posRec << std::endl;
nrBoards++;
}
}
myCout << "\n Size: " << nrBoards << " boards in the record" << std::endl;
myCout << std::endl;
myCout << std::endl;
}
// print L1 GT board - slot map
void L1GtBoardMaps::printGtBoardSlotMap(std::ostream& myCout) const {
myCout << "\nL1 GT board - slot map" << std::endl;
int nrBoards = 0;
int posRec = -1;
uint16_t boardId = 0;
std::string boardName;
for (std::vector<L1GtBoard>::const_iterator cIt = m_gtBoardMaps.begin(); cIt != m_gtBoardMaps.end(); ++cIt) {
posRec = cIt->gtBoardSlot();
boardId = cIt->gtBoardId();
boardName = cIt->gtBoardName();
if (posRec >= 0) {
myCout << " " << boardName << " " << std::hex << boardId << std::dec << " in slot " << posRec << std::endl;
nrBoards++;
}
}
myCout << "\n Size: " << nrBoards << " boards in the slot map" << std::endl;
myCout << std::endl;
myCout << std::endl;
}
// print L1 GT board name in hw record map
void L1GtBoardMaps::printGtBoardHexNameMap(std::ostream& myCout) const {
myCout << "\nL1 GT board names in hw record map" << std::endl;
int nrBoards = 0;
int posRec = -1;
uint16_t boardId = 0;
std::string boardName;
for (std::vector<L1GtBoard>::const_iterator cIt = m_gtBoardMaps.begin(); cIt != m_gtBoardMaps.end(); ++cIt) {
posRec = cIt->gtBoardHexName();
boardId = cIt->gtBoardId();
boardName = cIt->gtBoardName();
if (posRec >= 0) {
myCout << " " << boardName << " " << std::hex << boardId << std::dec << " has HexName " << std::hex << posRec
<< std::dec << std::endl;
nrBoards++;
}
}
myCout << "\n Size: " << nrBoards << " boards in the record" << std::endl;
myCout << std::endl;
myCout << std::endl;
}
// print L1 quadruplet (4x16 bits)(cable) to PSB input map
void L1GtBoardMaps::printGtQuadToPsbMap(std::ostream& myCout) const {
myCout << "\nL1 GT \"cables to PSB\" input map (4x16 bits per cable) - DEPRECATED" << std::endl;
int nrBoards = 0;
int nrCable = 0;
for (std::vector<L1GtBoard>::const_iterator cIt = m_gtBoardMaps.begin(); cIt != m_gtBoardMaps.end(); ++cIt) {
if (cIt->gtBoardType() == PSB) {
myCout << "\n PSB_" << cIt->gtBoardIndex() << "\n ";
nrBoards++;
std::vector<L1GtPsbQuad> quadInPsb = cIt->gtQuadInPsb();
std::string objType;
for (std::vector<L1GtPsbQuad>::const_iterator cItQuad = quadInPsb.begin(); cItQuad != quadInPsb.end();
++cItQuad) {
nrCable++;
if (*cItQuad == TechTr) {
objType = "TechTr";
} else if (*cItQuad == IsoEGQ) {
objType = "IsoEGQ";
} else if (*cItQuad == NoIsoEGQ) {
objType = "NoIsoEGQ";
} else if (*cItQuad == CenJetQ) {
objType = "CenJetQ";
} else if (*cItQuad == ForJetQ) {
objType = "ForJetQ";
} else if (*cItQuad == TauJetQ) {
objType = "TauJetQ";
} else if (*cItQuad == ESumsQ) {
objType = "ESumsQ";
} else if (*cItQuad == JetCountsQ) {
objType = "JetCountsQ";
} else if (*cItQuad == MQB1) {
objType = "MQB1";
} else if (*cItQuad == MQB2) {
objType = "MQB2";
} else if (*cItQuad == MQF3) {
objType = "MQF3";
} else if (*cItQuad == MQF4) {
objType = "MQF4";
} else if (*cItQuad == MQB5) {
objType = "MQB5";
} else if (*cItQuad == MQB6) {
objType = "MQB6";
} else if (*cItQuad == MQF7) {
objType = "MQF7";
} else if (*cItQuad == MQF8) {
objType = "MQF8";
} else if (*cItQuad == MQB9) {
objType = "MQB9";
} else if (*cItQuad == MQB10) {
objType = "MQB10";
} else if (*cItQuad == MQF11) {
objType = "MQF11";
} else if (*cItQuad == MQF12) {
objType = "MQF12";
} else if (*cItQuad == Free) {
objType = "Free";
} else if (*cItQuad == HfQ) {
objType = "HfQ";
} else {
myCout << "\n\nError: no such member " << (*cItQuad) << " in enum L1GtPsbQuad\n\n" << std::endl;
objType = "ERROR";
}
myCout << objType << " ";
}
}
}
myCout << "\n\n Size: " << nrCable << " cables for " << nrBoards << " PSB boards" << std::endl;
myCout << std::endl;
}
// output stream operator
std::ostream& operator<<(std::ostream& os, const L1GtBoardMaps& result) {
result.print(os);
return os;
}
|