47 boost::shared_ptr<L1GtParameters> pL1GtParameters = boost::shared_ptr<L1GtParameters>(
52 const std::string gtSchema =
"CMS_GT";
72 std::vector<std::string> columns;
73 columns.push_back(
"EVM_INCLUDE_TCS");
74 columns.push_back(
"EVM_INCLUDE_FDL");
75 columns.push_back(
"DAQ_INCLUDE_FDL");
76 columns.push_back(
"DAQ_INCLUDE_PSB0");
77 columns.push_back(
"DAQ_INCLUDE_PSB1");
78 columns.push_back(
"DAQ_INCLUDE_PSB2");
79 columns.push_back(
"DAQ_INCLUDE_PSB3");
80 columns.push_back(
"DAQ_INCLUDE_PSB4");
81 columns.push_back(
"DAQ_INCLUDE_PSB5");
82 columns.push_back(
"DAQ_INCLUDE_PSB6");
83 columns.push_back(
"DAQ_INCLUDE_GMT");
84 columns.push_back(
"DAQ_INCLUDE_TIM");
85 columns.push_back(
"DAQ_NB_BC_PER_EVENT_FDL");
86 columns.push_back(
"DAQ_NB_BC_PER_EVENT_PSB0");
87 columns.push_back(
"DAQ_NB_BC_PER_EVENT_PSB1");
88 columns.push_back(
"DAQ_NB_BC_PER_EVENT_PSB2");
89 columns.push_back(
"DAQ_NB_BC_PER_EVENT_PSB3");
90 columns.push_back(
"DAQ_NB_BC_PER_EVENT_PSB4");
91 columns.push_back(
"DAQ_NB_BC_PER_EVENT_PSB5");
92 columns.push_back(
"DAQ_NB_BC_PER_EVENT_PSB6");
93 columns.push_back(
"DAQ_NB_BC_PER_EVENT_GMT");
94 columns.push_back(
"DAQ_NB_BC_PER_EVENT_TIM");
95 columns.push_back(
"BST_DATA_NB_BYTES");
104 edm::LogError(
"L1-O2O") <<
"Problem with L1GtParameters key:" << objectKey;
105 return pL1GtParameters;
108 bool activeBoardsEvmTCS =
false;
109 results.
fillVariable(
"EVM_INCLUDE_TCS", activeBoardsEvmTCS);
111 bool activeBoardsEvmFDL =
false;
112 results.
fillVariable(
"EVM_INCLUDE_FDL", activeBoardsEvmFDL);
114 bool activeBoardsDaqFDL =
false;
115 results.
fillVariable(
"DAQ_INCLUDE_FDL", activeBoardsDaqFDL);
117 bool activeBoardsDaqPSB0 =
false;
118 results.
fillVariable(
"DAQ_INCLUDE_PSB0", activeBoardsDaqPSB0);
120 bool activeBoardsDaqPSB1 =
false;
121 results.
fillVariable(
"DAQ_INCLUDE_PSB1", activeBoardsDaqPSB1);
123 bool activeBoardsDaqPSB2 =
false;
124 results.
fillVariable(
"DAQ_INCLUDE_PSB2", activeBoardsDaqPSB2);
126 bool activeBoardsDaqPSB3 =
false;
127 results.
fillVariable(
"DAQ_INCLUDE_PSB3", activeBoardsDaqPSB3);
129 bool activeBoardsDaqPSB4;
130 results.
fillVariable(
"DAQ_INCLUDE_PSB4", activeBoardsDaqPSB4);
132 bool activeBoardsDaqPSB5 =
false;
133 results.
fillVariable(
"DAQ_INCLUDE_PSB5", activeBoardsDaqPSB5);
135 bool activeBoardsDaqPSB6;
136 results.
fillVariable(
"DAQ_INCLUDE_PSB6", activeBoardsDaqPSB6);
138 bool activeBoardsDaqGMT;
139 results.
fillVariable(
"DAQ_INCLUDE_GMT", activeBoardsDaqGMT);
141 bool activeBoardsDaqTIM =
false;
142 results.
fillVariable(
"DAQ_INCLUDE_TIM", activeBoardsDaqTIM);
144 std::string totalBxInEventStr;
145 results.
fillVariable(
"DAQ_NB_BC_PER_EVENT_FDL", totalBxInEventStr);
148 std::string daqNrBxBoardStrFDL;
149 results.
fillVariable(
"DAQ_NB_BC_PER_EVENT_FDL", daqNrBxBoardStrFDL);
151 std::string daqNrBxBoardStrPSB0;
152 results.
fillVariable(
"DAQ_NB_BC_PER_EVENT_PSB0", daqNrBxBoardStrPSB0);
154 std::string daqNrBxBoardStrPSB1;
155 results.
fillVariable(
"DAQ_NB_BC_PER_EVENT_PSB1", daqNrBxBoardStrPSB1);
157 std::string daqNrBxBoardStrPSB2;
158 results.
fillVariable(
"DAQ_NB_BC_PER_EVENT_PSB2", daqNrBxBoardStrPSB2);
160 std::string daqNrBxBoardStrPSB3;
161 results.
fillVariable(
"DAQ_NB_BC_PER_EVENT_PSB3", daqNrBxBoardStrPSB3);
163 std::string daqNrBxBoardStrPSB4;
164 results.
fillVariable(
"DAQ_NB_BC_PER_EVENT_PSB4", daqNrBxBoardStrPSB4);
166 std::string daqNrBxBoardStrPSB5;
167 results.
fillVariable(
"DAQ_NB_BC_PER_EVENT_PSB5", daqNrBxBoardStrPSB5);
169 std::string daqNrBxBoardStrPSB6;
170 results.
fillVariable(
"DAQ_NB_BC_PER_EVENT_PSB6", daqNrBxBoardStrPSB6);
172 std::string daqNrBxBoardStrGMT;
173 results.
fillVariable(
"DAQ_NB_BC_PER_EVENT_GMT", daqNrBxBoardStrGMT);
175 std::string daqNrBxBoardStrTIM;
176 results.
fillVariable(
"DAQ_NB_BC_PER_EVENT_TIM", daqNrBxBoardStrTIM);
178 std::string bstLengthBytesStr;
179 results.
fillVariable(
"BST_DATA_NB_BYTES", bstLengthBytesStr);
184 int totalBxInEventVal = boost::lexical_cast<
int>(totalBxInEventStr);
185 pL1GtParameters->setGtTotalBxInEvent(totalBxInEventVal);
193 boost::uint16_t daqActiveBoardsVal = 0;
195 int daqActiveBoardsLength = 16;
196 std::vector<int> daqNrBxBoard(daqActiveBoardsLength, 0);
199 if (activeBoardsDaqFDL) {
200 daqActiveBoardsVal = daqActiveBoardsVal | ( 1 << iActiveBit );
202 daqNrBxBoard.at(iActiveBit) = boost::lexical_cast<
int>(daqNrBxBoardStrFDL);
205 if (activeBoardsDaqPSB0) {
206 daqActiveBoardsVal = daqActiveBoardsVal | ( 1 << iActiveBit );
208 daqNrBxBoard.at(iActiveBit) = boost::lexical_cast<
int>(daqNrBxBoardStrPSB0);
211 if (activeBoardsDaqPSB1) {
212 daqActiveBoardsVal = daqActiveBoardsVal | ( 1 << iActiveBit );
214 daqNrBxBoard.at(iActiveBit) = boost::lexical_cast<
int>(daqNrBxBoardStrPSB1);
217 if (activeBoardsDaqPSB2) {
218 daqActiveBoardsVal = daqActiveBoardsVal | ( 1 << iActiveBit );
220 daqNrBxBoard.at(iActiveBit) = boost::lexical_cast<
int>(daqNrBxBoardStrPSB2);
223 if (activeBoardsDaqPSB3) {
224 daqActiveBoardsVal = daqActiveBoardsVal | ( 1 << iActiveBit );
226 daqNrBxBoard.at(iActiveBit) = boost::lexical_cast<
int>(daqNrBxBoardStrPSB3);
229 if (activeBoardsDaqPSB4) {
230 daqActiveBoardsVal = daqActiveBoardsVal | ( 1 << iActiveBit );
232 daqNrBxBoard.at(iActiveBit) = boost::lexical_cast<
int>(daqNrBxBoardStrPSB4);
235 if (activeBoardsDaqPSB5) {
236 daqActiveBoardsVal = daqActiveBoardsVal | ( 1 << iActiveBit );
238 daqNrBxBoard.at(iActiveBit) = boost::lexical_cast<
int>(daqNrBxBoardStrPSB5);
241 if (activeBoardsDaqPSB6) {
242 daqActiveBoardsVal = daqActiveBoardsVal | ( 1 << iActiveBit );
244 daqNrBxBoard.at(iActiveBit) = boost::lexical_cast<
int>(daqNrBxBoardStrPSB6);
247 if (activeBoardsDaqGMT) {
248 daqActiveBoardsVal = daqActiveBoardsVal | ( 1 << iActiveBit );
250 daqNrBxBoard.at(iActiveBit) = boost::lexical_cast<
int>(daqNrBxBoardStrGMT);
260 boost::uint16_t evmActiveBoardsVal = 0;
262 int evmActiveBoardsLength = 16;
263 std::vector<int> evmNrBxBoard(evmActiveBoardsLength, 0);
266 if (activeBoardsEvmTCS) {
267 evmActiveBoardsVal = evmActiveBoardsVal | ( 1 << iActiveBit );
270 evmNrBxBoard.at(iActiveBit) = 1;
273 if (activeBoardsEvmFDL) {
274 evmActiveBoardsVal = evmActiveBoardsVal | ( 1 << iActiveBit );
277 evmNrBxBoard.at(iActiveBit) = boost::lexical_cast<
int>(daqNrBxBoardStrFDL);
281 pL1GtParameters->setGtDaqActiveBoards(daqActiveBoardsVal);
282 pL1GtParameters->setGtEvmActiveBoards(evmActiveBoardsVal);
283 pL1GtParameters->setGtDaqNrBxBoard(daqNrBxBoard);
284 pL1GtParameters->setGtEvmNrBxBoard(evmNrBxBoard);
287 unsigned int bstLengthBytesVal = boost::lexical_cast<
unsigned int>(bstLengthBytesStr);
288 pL1GtParameters->setGtBstLengthBytes(bstLengthBytesVal);
291 std::ostringstream myCoutStream;
292 pL1GtParameters->print(myCoutStream);
293 LogTrace(
"L1GtParametersConfigOnlineProd")
294 <<
"\nThe following L1GtParameters record was read from OMDS: \n"
295 << myCoutStream.str() <<
"\n" << std::endl;
298 return pL1GtParameters;
bool fillVariable(const std::string &columnName, T &outputVariable) const
const QueryResults singleAttribute(const T &data) const
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="") const
l1t::OMDSReader m_omdsReader