CMS 3D CMS Logo

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