35 auto pL1GtParameters = std::make_unique<L1GtParameters>();
59 std::vector<std::string>
columns;
60 columns.push_back(
"EVM_INCLUDE_TCS");
61 columns.push_back(
"EVM_INCLUDE_FDL");
62 columns.push_back(
"DAQ_INCLUDE_FDL");
63 columns.push_back(
"DAQ_INCLUDE_PSB0");
64 columns.push_back(
"DAQ_INCLUDE_PSB1");
65 columns.push_back(
"DAQ_INCLUDE_PSB2");
66 columns.push_back(
"DAQ_INCLUDE_PSB3");
67 columns.push_back(
"DAQ_INCLUDE_PSB4");
68 columns.push_back(
"DAQ_INCLUDE_PSB5");
69 columns.push_back(
"DAQ_INCLUDE_PSB6");
70 columns.push_back(
"DAQ_INCLUDE_GMT");
71 columns.push_back(
"DAQ_INCLUDE_TIM");
72 columns.push_back(
"DAQ_NB_BC_PER_EVENT_FDL");
73 columns.push_back(
"DAQ_NB_BC_PER_EVENT_PSB0");
74 columns.push_back(
"DAQ_NB_BC_PER_EVENT_PSB1");
75 columns.push_back(
"DAQ_NB_BC_PER_EVENT_PSB2");
76 columns.push_back(
"DAQ_NB_BC_PER_EVENT_PSB3");
77 columns.push_back(
"DAQ_NB_BC_PER_EVENT_PSB4");
78 columns.push_back(
"DAQ_NB_BC_PER_EVENT_PSB5");
79 columns.push_back(
"DAQ_NB_BC_PER_EVENT_PSB6");
80 columns.push_back(
"DAQ_NB_BC_PER_EVENT_GMT");
81 columns.push_back(
"DAQ_NB_BC_PER_EVENT_TIM");
82 columns.push_back(
"BST_DATA_NB_BYTES");
89 edm::LogError(
"L1-O2O") <<
"Problem with L1GtParameters key:" << objectKey;
90 return pL1GtParameters;
93 bool activeBoardsEvmTCS =
false;
94 results.fillVariable(
"EVM_INCLUDE_TCS", activeBoardsEvmTCS);
96 bool activeBoardsEvmFDL =
false;
97 results.fillVariable(
"EVM_INCLUDE_FDL", activeBoardsEvmFDL);
99 bool activeBoardsDaqFDL =
false;
100 results.fillVariable(
"DAQ_INCLUDE_FDL", activeBoardsDaqFDL);
102 bool activeBoardsDaqPSB0 =
false;
103 results.fillVariable(
"DAQ_INCLUDE_PSB0", activeBoardsDaqPSB0);
105 bool activeBoardsDaqPSB1 =
false;
106 results.fillVariable(
"DAQ_INCLUDE_PSB1", activeBoardsDaqPSB1);
108 bool activeBoardsDaqPSB2 =
false;
109 results.fillVariable(
"DAQ_INCLUDE_PSB2", activeBoardsDaqPSB2);
111 bool activeBoardsDaqPSB3 =
false;
112 results.fillVariable(
"DAQ_INCLUDE_PSB3", activeBoardsDaqPSB3);
114 bool activeBoardsDaqPSB4;
115 results.fillVariable(
"DAQ_INCLUDE_PSB4", activeBoardsDaqPSB4);
117 bool activeBoardsDaqPSB5 =
false;
118 results.fillVariable(
"DAQ_INCLUDE_PSB5", activeBoardsDaqPSB5);
120 bool activeBoardsDaqPSB6;
121 results.fillVariable(
"DAQ_INCLUDE_PSB6", activeBoardsDaqPSB6);
123 bool activeBoardsDaqGMT;
124 results.fillVariable(
"DAQ_INCLUDE_GMT", activeBoardsDaqGMT);
126 bool activeBoardsDaqTIM =
false;
127 results.fillVariable(
"DAQ_INCLUDE_TIM", activeBoardsDaqTIM);
130 results.fillVariable(
"DAQ_NB_BC_PER_EVENT_FDL", totalBxInEventStr);
134 results.fillVariable(
"DAQ_NB_BC_PER_EVENT_FDL", daqNrBxBoardStrFDL);
137 results.fillVariable(
"DAQ_NB_BC_PER_EVENT_PSB0", daqNrBxBoardStrPSB0);
140 results.fillVariable(
"DAQ_NB_BC_PER_EVENT_PSB1", daqNrBxBoardStrPSB1);
143 results.fillVariable(
"DAQ_NB_BC_PER_EVENT_PSB2", daqNrBxBoardStrPSB2);
146 results.fillVariable(
"DAQ_NB_BC_PER_EVENT_PSB3", daqNrBxBoardStrPSB3);
149 results.fillVariable(
"DAQ_NB_BC_PER_EVENT_PSB4", daqNrBxBoardStrPSB4);
152 results.fillVariable(
"DAQ_NB_BC_PER_EVENT_PSB5", daqNrBxBoardStrPSB5);
155 results.fillVariable(
"DAQ_NB_BC_PER_EVENT_PSB6", daqNrBxBoardStrPSB6);
158 results.fillVariable(
"DAQ_NB_BC_PER_EVENT_GMT", daqNrBxBoardStrGMT);
161 results.fillVariable(
"DAQ_NB_BC_PER_EVENT_TIM", daqNrBxBoardStrTIM);
164 results.fillVariable(
"BST_DATA_NB_BYTES", bstLengthBytesStr);
169 int totalBxInEventVal = std::stoi(totalBxInEventStr);
170 pL1GtParameters->setGtTotalBxInEvent(totalBxInEventVal);
178 uint16_t daqActiveBoardsVal = 0;
180 int daqActiveBoardsLength = 16;
181 std::vector<int> daqNrBxBoard(daqActiveBoardsLength, 0);
184 if (activeBoardsDaqFDL) {
185 daqActiveBoardsVal = daqActiveBoardsVal | (1 << iActiveBit);
187 daqNrBxBoard.at(iActiveBit) = std::stoi(daqNrBxBoardStrFDL);
190 if (activeBoardsDaqPSB0) {
191 daqActiveBoardsVal = daqActiveBoardsVal | (1 << iActiveBit);
193 daqNrBxBoard.at(iActiveBit) = std::stoi(daqNrBxBoardStrPSB0);
196 if (activeBoardsDaqPSB1) {
197 daqActiveBoardsVal = daqActiveBoardsVal | (1 << iActiveBit);
199 daqNrBxBoard.at(iActiveBit) = std::stoi(daqNrBxBoardStrPSB1);
202 if (activeBoardsDaqPSB2) {
203 daqActiveBoardsVal = daqActiveBoardsVal | (1 << iActiveBit);
205 daqNrBxBoard.at(iActiveBit) = std::stoi(daqNrBxBoardStrPSB2);
208 if (activeBoardsDaqPSB3) {
209 daqActiveBoardsVal = daqActiveBoardsVal | (1 << iActiveBit);
211 daqNrBxBoard.at(iActiveBit) = std::stoi(daqNrBxBoardStrPSB3);
214 if (activeBoardsDaqPSB4) {
215 daqActiveBoardsVal = daqActiveBoardsVal | (1 << iActiveBit);
217 daqNrBxBoard.at(iActiveBit) = std::stoi(daqNrBxBoardStrPSB4);
220 if (activeBoardsDaqPSB5) {
221 daqActiveBoardsVal = daqActiveBoardsVal | (1 << iActiveBit);
223 daqNrBxBoard.at(iActiveBit) = std::stoi(daqNrBxBoardStrPSB5);
226 if (activeBoardsDaqPSB6) {
227 daqActiveBoardsVal = daqActiveBoardsVal | (1 << iActiveBit);
229 daqNrBxBoard.at(iActiveBit) = std::stoi(daqNrBxBoardStrPSB6);
232 if (activeBoardsDaqGMT) {
233 daqActiveBoardsVal = daqActiveBoardsVal | (1 << iActiveBit);
235 daqNrBxBoard.at(iActiveBit) = std::stoi(daqNrBxBoardStrGMT);
245 uint16_t evmActiveBoardsVal = 0;
247 int evmActiveBoardsLength = 16;
248 std::vector<int> evmNrBxBoard(evmActiveBoardsLength, 0);
251 if (activeBoardsEvmTCS) {
252 evmActiveBoardsVal = evmActiveBoardsVal | (1 << iActiveBit);
255 evmNrBxBoard.at(iActiveBit) = 1;
258 if (activeBoardsEvmFDL) {
259 evmActiveBoardsVal = evmActiveBoardsVal | (1 << iActiveBit);
262 evmNrBxBoard.at(iActiveBit) = std::stoi(daqNrBxBoardStrFDL);
265 pL1GtParameters->setGtDaqActiveBoards(daqActiveBoardsVal);
266 pL1GtParameters->setGtEvmActiveBoards(evmActiveBoardsVal);
267 pL1GtParameters->setGtDaqNrBxBoard(daqNrBxBoard);
268 pL1GtParameters->setGtEvmNrBxBoard(evmNrBxBoard);
271 unsigned int bstLengthBytesVal = std::stoul(bstLengthBytesStr);
272 pL1GtParameters->setGtBstLengthBytes(bstLengthBytesVal);
275 std::ostringstream myCoutStream;
276 pL1GtParameters->print(myCoutStream);
277 LogTrace(
"L1GtParametersConfigOnlineProd") <<
"\nThe following L1GtParameters record was read from OMDS: \n" 278 << myCoutStream.str() <<
"\n" 282 return pL1GtParameters;
std::unique_ptr< L1GtParameters > newObject(const std::string &objectKey) override
public methods
const QueryResults singleAttribute(const T &data) const
Log< level::Error, false > LogError
L1GtParametersConfigOnlineProd(const edm::ParameterSet &)
constructor
const QueryResults basicQuery(const std::vector< std::string > &columnNames, const std::string &schemaName, const std::string &tableName, const std::string &conditionLHS="", const QueryResults conditionRHS=QueryResults(), const std::string &conditionRHSName="")
l1t::OMDSReader m_omdsReader
~L1GtParametersConfigOnlineProd() override
destructor
#define DEFINE_FWK_EVENTSETUP_MODULE(type)