19 #include "boost/lexical_cast.hpp"
38 auto pL1GtParameters = std::make_unique<L1GtParameters>();
62 std::vector<std::string>
columns;
63 columns.push_back(
"EVM_INCLUDE_TCS");
64 columns.push_back(
"EVM_INCLUDE_FDL");
65 columns.push_back(
"DAQ_INCLUDE_FDL");
66 columns.push_back(
"DAQ_INCLUDE_PSB0");
67 columns.push_back(
"DAQ_INCLUDE_PSB1");
68 columns.push_back(
"DAQ_INCLUDE_PSB2");
69 columns.push_back(
"DAQ_INCLUDE_PSB3");
70 columns.push_back(
"DAQ_INCLUDE_PSB4");
71 columns.push_back(
"DAQ_INCLUDE_PSB5");
72 columns.push_back(
"DAQ_INCLUDE_PSB6");
73 columns.push_back(
"DAQ_INCLUDE_GMT");
74 columns.push_back(
"DAQ_INCLUDE_TIM");
75 columns.push_back(
"DAQ_NB_BC_PER_EVENT_FDL");
76 columns.push_back(
"DAQ_NB_BC_PER_EVENT_PSB0");
77 columns.push_back(
"DAQ_NB_BC_PER_EVENT_PSB1");
78 columns.push_back(
"DAQ_NB_BC_PER_EVENT_PSB2");
79 columns.push_back(
"DAQ_NB_BC_PER_EVENT_PSB3");
80 columns.push_back(
"DAQ_NB_BC_PER_EVENT_PSB4");
81 columns.push_back(
"DAQ_NB_BC_PER_EVENT_PSB5");
82 columns.push_back(
"DAQ_NB_BC_PER_EVENT_PSB6");
83 columns.push_back(
"DAQ_NB_BC_PER_EVENT_GMT");
84 columns.push_back(
"DAQ_NB_BC_PER_EVENT_TIM");
85 columns.push_back(
"BST_DATA_NB_BYTES");
92 edm::LogError(
"L1-O2O") <<
"Problem with L1GtParameters key:" << objectKey;
93 return pL1GtParameters;
96 bool activeBoardsEvmTCS =
false;
97 results.fillVariable(
"EVM_INCLUDE_TCS", activeBoardsEvmTCS);
99 bool activeBoardsEvmFDL =
false;
100 results.fillVariable(
"EVM_INCLUDE_FDL", activeBoardsEvmFDL);
102 bool activeBoardsDaqFDL =
false;
103 results.fillVariable(
"DAQ_INCLUDE_FDL", activeBoardsDaqFDL);
105 bool activeBoardsDaqPSB0 =
false;
106 results.fillVariable(
"DAQ_INCLUDE_PSB0", activeBoardsDaqPSB0);
108 bool activeBoardsDaqPSB1 =
false;
109 results.fillVariable(
"DAQ_INCLUDE_PSB1", activeBoardsDaqPSB1);
111 bool activeBoardsDaqPSB2 =
false;
112 results.fillVariable(
"DAQ_INCLUDE_PSB2", activeBoardsDaqPSB2);
114 bool activeBoardsDaqPSB3 =
false;
115 results.fillVariable(
"DAQ_INCLUDE_PSB3", activeBoardsDaqPSB3);
117 bool activeBoardsDaqPSB4;
118 results.fillVariable(
"DAQ_INCLUDE_PSB4", activeBoardsDaqPSB4);
120 bool activeBoardsDaqPSB5 =
false;
121 results.fillVariable(
"DAQ_INCLUDE_PSB5", activeBoardsDaqPSB5);
123 bool activeBoardsDaqPSB6;
124 results.fillVariable(
"DAQ_INCLUDE_PSB6", activeBoardsDaqPSB6);
126 bool activeBoardsDaqGMT;
127 results.fillVariable(
"DAQ_INCLUDE_GMT", activeBoardsDaqGMT);
129 bool activeBoardsDaqTIM =
false;
130 results.fillVariable(
"DAQ_INCLUDE_TIM", activeBoardsDaqTIM);
133 results.fillVariable(
"DAQ_NB_BC_PER_EVENT_FDL", totalBxInEventStr);
137 results.fillVariable(
"DAQ_NB_BC_PER_EVENT_FDL", daqNrBxBoardStrFDL);
140 results.fillVariable(
"DAQ_NB_BC_PER_EVENT_PSB0", daqNrBxBoardStrPSB0);
143 results.fillVariable(
"DAQ_NB_BC_PER_EVENT_PSB1", daqNrBxBoardStrPSB1);
146 results.fillVariable(
"DAQ_NB_BC_PER_EVENT_PSB2", daqNrBxBoardStrPSB2);
149 results.fillVariable(
"DAQ_NB_BC_PER_EVENT_PSB3", daqNrBxBoardStrPSB3);
152 results.fillVariable(
"DAQ_NB_BC_PER_EVENT_PSB4", daqNrBxBoardStrPSB4);
155 results.fillVariable(
"DAQ_NB_BC_PER_EVENT_PSB5", daqNrBxBoardStrPSB5);
158 results.fillVariable(
"DAQ_NB_BC_PER_EVENT_PSB6", daqNrBxBoardStrPSB6);
161 results.fillVariable(
"DAQ_NB_BC_PER_EVENT_GMT", daqNrBxBoardStrGMT);
164 results.fillVariable(
"DAQ_NB_BC_PER_EVENT_TIM", daqNrBxBoardStrTIM);
167 results.fillVariable(
"BST_DATA_NB_BYTES", bstLengthBytesStr);
172 int totalBxInEventVal = boost::lexical_cast<int>(totalBxInEventStr);
173 pL1GtParameters->setGtTotalBxInEvent(totalBxInEventVal);
181 uint16_t daqActiveBoardsVal = 0;
183 int daqActiveBoardsLength = 16;
184 std::vector<int> daqNrBxBoard(daqActiveBoardsLength, 0);
187 if (activeBoardsDaqFDL) {
188 daqActiveBoardsVal = daqActiveBoardsVal | (1 << iActiveBit);
190 daqNrBxBoard.at(iActiveBit) = boost::lexical_cast<int>(daqNrBxBoardStrFDL);
193 if (activeBoardsDaqPSB0) {
194 daqActiveBoardsVal = daqActiveBoardsVal | (1 << iActiveBit);
196 daqNrBxBoard.at(iActiveBit) = boost::lexical_cast<int>(daqNrBxBoardStrPSB0);
199 if (activeBoardsDaqPSB1) {
200 daqActiveBoardsVal = daqActiveBoardsVal | (1 << iActiveBit);
202 daqNrBxBoard.at(iActiveBit) = boost::lexical_cast<int>(daqNrBxBoardStrPSB1);
205 if (activeBoardsDaqPSB2) {
206 daqActiveBoardsVal = daqActiveBoardsVal | (1 << iActiveBit);
208 daqNrBxBoard.at(iActiveBit) = boost::lexical_cast<int>(daqNrBxBoardStrPSB2);
211 if (activeBoardsDaqPSB3) {
212 daqActiveBoardsVal = daqActiveBoardsVal | (1 << iActiveBit);
214 daqNrBxBoard.at(iActiveBit) = boost::lexical_cast<int>(daqNrBxBoardStrPSB3);
217 if (activeBoardsDaqPSB4) {
218 daqActiveBoardsVal = daqActiveBoardsVal | (1 << iActiveBit);
220 daqNrBxBoard.at(iActiveBit) = boost::lexical_cast<int>(daqNrBxBoardStrPSB4);
223 if (activeBoardsDaqPSB5) {
224 daqActiveBoardsVal = daqActiveBoardsVal | (1 << iActiveBit);
226 daqNrBxBoard.at(iActiveBit) = boost::lexical_cast<int>(daqNrBxBoardStrPSB5);
229 if (activeBoardsDaqPSB6) {
230 daqActiveBoardsVal = daqActiveBoardsVal | (1 << iActiveBit);
232 daqNrBxBoard.at(iActiveBit) = boost::lexical_cast<int>(daqNrBxBoardStrPSB6);
235 if (activeBoardsDaqGMT) {
236 daqActiveBoardsVal = daqActiveBoardsVal | (1 << iActiveBit);
238 daqNrBxBoard.at(iActiveBit) = boost::lexical_cast<int>(daqNrBxBoardStrGMT);
248 uint16_t evmActiveBoardsVal = 0;
250 int evmActiveBoardsLength = 16;
251 std::vector<int> evmNrBxBoard(evmActiveBoardsLength, 0);
254 if (activeBoardsEvmTCS) {
255 evmActiveBoardsVal = evmActiveBoardsVal | (1 << iActiveBit);
258 evmNrBxBoard.at(iActiveBit) = 1;
261 if (activeBoardsEvmFDL) {
262 evmActiveBoardsVal = evmActiveBoardsVal | (1 << iActiveBit);
265 evmNrBxBoard.at(iActiveBit) = boost::lexical_cast<int>(daqNrBxBoardStrFDL);
268 pL1GtParameters->setGtDaqActiveBoards(daqActiveBoardsVal);
269 pL1GtParameters->setGtEvmActiveBoards(evmActiveBoardsVal);
270 pL1GtParameters->setGtDaqNrBxBoard(daqNrBxBoard);
271 pL1GtParameters->setGtEvmNrBxBoard(evmNrBxBoard);
274 unsigned int bstLengthBytesVal = boost::lexical_cast<unsigned int>(bstLengthBytesStr);
275 pL1GtParameters->setGtBstLengthBytes(bstLengthBytesVal);
278 std::ostringstream myCoutStream;
279 pL1GtParameters->print(myCoutStream);
280 LogTrace(
"L1GtParametersConfigOnlineProd") <<
"\nThe following L1GtParameters record was read from OMDS: \n"
281 << myCoutStream.str() <<
"\n"
285 return pL1GtParameters;