CMS 3D CMS Logo

L1GtTriggerMenuConfigOnlineProd.cc
Go to the documentation of this file.
1 
15 // this class header
17 
18 // system include files
19 #include <string>
20 #include <vector>
21 #include <map>
22 #include <list>
23 #include <utility>
24 #include <algorithm>
25 
26 #include "boost/lexical_cast.hpp"
27 
28 // user include files
30 
33 
35 
38 
39 // constructor
42  // empty
43 }
44 
45 // destructor
47  // empty
48 }
49 
50 // public methods
51 
52 // initialize the class (mainly reserve/resize)
53 void L1GtTriggerMenuConfigOnlineProd::init(const int numberConditionChips) {
54  // resize the vectors of condition maps
55  // the number of condition chips should be correctly set
56 
57  m_vecMuonTemplate.resize(numberConditionChips);
58  m_vecCaloTemplate.resize(numberConditionChips);
59  m_vecEnergySumTemplate.resize(numberConditionChips);
60  m_vecJetCountsTemplate.resize(numberConditionChips);
61  m_vecCastorTemplate.resize(numberConditionChips);
62  m_vecHfBitCountsTemplate.resize(numberConditionChips);
63  m_vecHfRingEtSumsTemplate.resize(numberConditionChips);
64  m_vecBptxTemplate.resize(numberConditionChips);
65  m_vecExternalTemplate.resize(numberConditionChips);
66 
67  m_vecCorrelationTemplate.resize(numberConditionChips);
68  m_corMuonTemplate.resize(numberConditionChips);
69  m_corCaloTemplate.resize(numberConditionChips);
70  m_corEnergySumTemplate.resize(numberConditionChips);
71 }
72 
73 std::unique_ptr<L1GtTriggerMenu> L1GtTriggerMenuConfigOnlineProd::newObject(const std::string& objectKey) {
74  // FIXME seems to not work anymore in constructor...
76 
77  auto pL1GtTriggerMenuEmpty = std::make_unique<L1GtTriggerMenu>();
78 
79  // FIXME get it from L1GtStableParameters?
80  // initialize once, from outside
81  const unsigned int numberConditionChips = 2;
82  init(numberConditionChips);
83 
84  const std::string gtSchema = "CMS_GT";
85 
86  // l1GtTriggerMenu: parameters in table GTFE_SETUP_FK
87  // the objectKey for the menu obtained from GT_SETUP is the L1T_MENU_IMPL key
88 
89  // SQL queries:
90 
91  // retrieve table with general menu parameters from DB, view L1T_MENU_GENERAL_VIEW
92  if (!tableMenuGeneralFromDB(gtSchema, objectKey)) {
93  return pL1GtTriggerMenuEmpty;
94  }
95 
96  // build the menu name
97  std::string menuName =
99 
100  // retrieve table with physics algorithms from DB, view L1T_MENU_ALGO_VIEW
101  if (!tableMenuAlgoFromDB(gtSchema, objectKey)) {
102  return pL1GtTriggerMenuEmpty;
103  }
104 
105  // retrieve table with conditions associated to physics algorithms from DB
106  if (!tableMenuAlgoCondFromDB(gtSchema, objectKey)) {
107  return pL1GtTriggerMenuEmpty;
108  }
109 
110  // retrieve table with list of conditions in the menu
111  if (!tableMenuCondFromDB(gtSchema, objectKey)) {
112  return pL1GtTriggerMenuEmpty;
113  }
114 
115  // retrieve table with object parameters from DB, view CMS_GT.L1T_MENU_OP_VIEW
116  if (!tableMenuObjectParametersFromDB(gtSchema, objectKey)) {
117  return pL1GtTriggerMenuEmpty;
118  }
119 
120  // retrieve table with technical triggers from DB, view L1T_MENU_TECHTRIG_VIEW
121  if (!tableMenuTechTrigFromDB(gtSchema, objectKey)) {
122  return pL1GtTriggerMenuEmpty;
123  }
124 
125  // build the algorithm map in the menu
127 
128  // build the technical trigger map in the menu
130 
131  // add the conditions from a menu to the corresponding list
132  addConditions();
133 
134  // fill the record
135  auto pL1GtTriggerMenu = std::make_unique<L1GtTriggerMenu>(menuName,
136  numberConditionChips,
150 
151  pL1GtTriggerMenu->setGtTriggerMenuInterface(m_tableMenuGeneral.menuInterface);
152  pL1GtTriggerMenu->setGtTriggerMenuImplementation(m_tableMenuGeneral.menuImplementation);
153  pL1GtTriggerMenu->setGtScaleDbKey(m_tableMenuGeneral.scalesKey);
154 
155  pL1GtTriggerMenu->setGtAlgorithmMap(m_algorithmMap);
156  pL1GtTriggerMenu->setGtAlgorithmAliasMap(m_algorithmAliasMap);
157  pL1GtTriggerMenu->setGtTechnicalTriggerMap(m_technicalTriggerMap);
158 
159  if (m_isDebugEnabled) {
160  LogTrace("L1GtTriggerMenuConfigOnlineProd") << "\nThe following L1GtTriggerMenu record was read from OMDS: \n"
161  << std::endl;
162 
163  std::ostringstream myCoutStream;
164  int verbosity = 0;
165  pL1GtTriggerMenu->print(myCoutStream, verbosity);
166  LogTrace("L1GtTriggerMenuConfigOnlineProd") << "\n" << std::endl;
167 
168  verbosity = 2;
169  pL1GtTriggerMenu->print(myCoutStream, verbosity);
170  LogTrace("L1GtTriggerMenuConfigOnlineProd") << myCoutStream.str() << "\n" << std::endl;
171  }
172 
173  return pL1GtTriggerMenu;
174 }
175 
176 // retrieve table with general menu parameters from DB
178  const std::string& objectKey) {
179  // select * from CMS_GT.L1T_MENU_GENERAL_VIEW
180  // where L1T_MENU_GENERAL_VIEW.MENU_IMPLEMENTATION = objectKey
181 
182  const std::vector<std::string>& columns = m_omdsReader.columnNamesView(gtSchema, "L1T_MENU_GENERAL_VIEW");
183 
184  if (m_isDebugEnabled) {
185  LogTrace("L1GtTriggerMenuConfigOnlineProd") << "\n List of columns in L1T_MENU_GENERAL_VIEW:\n" << std::endl;
186  for (std::vector<std::string>::const_iterator iter = columns.begin(); iter != columns.end(); iter++) {
187  LogTrace("L1GtTriggerMenuConfigOnlineProd") << (*iter) << std::endl;
188  }
189  LogTrace("L1GtTriggerMenuConfigOnlineProd") << "\n\n" << std::endl;
190  }
191 
193  gtSchema,
194  "L1T_MENU_GENERAL_VIEW",
195  "L1T_MENU_GENERAL_VIEW.MENU_IMPLEMENTATION",
196  m_omdsReader.singleAttribute(objectKey));
197 
198  // check if query was successful
199  if (results.queryFailed()) {
200  edm::LogError("L1-O2O")
201  << "Problem to get content of L1T_MENU_GENERAL_VIEW for L1GtTriggerMenu implementation key: " << objectKey;
202  return false;
203  }
204 
205  // retrieve menu interface name, scales key, algorithm implementation tag
206 
207  for (std::vector<std::string>::const_iterator constIt = columns.begin(); constIt != columns.end(); ++constIt) {
208  if ((*constIt) == "MENU_IMPLEMENTATION") {
209  results.fillVariable(*constIt, m_tableMenuGeneral.menuImplementation);
210 
211  } else if ((*constIt) == "INTERFACE") {
212  results.fillVariable(*constIt, m_tableMenuGeneral.menuInterface);
213 
214  } else if ((*constIt) == "SCALES_KEY") {
215  results.fillVariable(*constIt, m_tableMenuGeneral.scalesKey);
216 
217  } else if ((*constIt) == "ALGO_IMPL_TAG") {
218  results.fillVariable(*constIt, m_tableMenuGeneral.algoImplTag);
219 
220  } else {
221  // do nothing
222  }
223  }
224 
225  // cross checks
226  if (m_tableMenuGeneral.menuImplementation != objectKey) {
227  LogTrace("L1GtTriggerMenuConfigOnlineProd")
228  << "\n L1 trigger menu implementation read from querying view not identical"
229  << "\n with menu key:"
230  << "\n from view: " << m_tableMenuGeneral.menuImplementation << "\n from key: " << objectKey
231  << "\n Menu implementation name set from key." << std::endl;
233  }
234 
235  //
236  return true;
237 }
238 
239 // retrieve table with physics algorithms from DB
241  // select * from CMS_GT.L1T_MENU_ALGO_VIEW
242  // where L1T_MENU_ALGO_VIEW.MENU_IMPLEMENTATION = objectKey
243 
244  const std::vector<std::string>& columnsMenuAlgo = m_omdsReader.columnNamesView(gtSchema, "L1T_MENU_ALGO_VIEW");
245 
246  if (m_isDebugEnabled) {
247  LogTrace("L1GtTriggerMenuConfigOnlineProd") << "\n List of columns in L1T_MENU_ALGO_VIEW:\n" << std::endl;
248  for (std::vector<std::string>::const_iterator iter = columnsMenuAlgo.begin(); iter != columnsMenuAlgo.end();
249  iter++) {
250  LogTrace("L1GtTriggerMenuConfigOnlineProd") << (*iter) << std::endl;
251  }
252  LogTrace("L1GtTriggerMenuConfigOnlineProd") << "\n\n" << std::endl;
253  }
254 
255  l1t::OMDSReader::QueryResults resultsMenuAlgo = m_omdsReader.basicQueryView(columnsMenuAlgo,
256  gtSchema,
257  "L1T_MENU_ALGO_VIEW",
258  "L1T_MENU_ALGO_VIEW.MENU_IMPLEMENTATION",
259  m_omdsReader.singleAttribute(objectKey));
260 
261  // check if query was successful is based on size of returned list
262  // BUT one can have menus w/o physics algorithms - no error for empty list, but a warning!
263  if (resultsMenuAlgo.queryFailed()) {
264  edm::LogWarning("L1-O2O") << "Warning: Content of L1T_MENU_ALGO_VIEW for L1GtTriggerMenu implementation key: "
265  << "\n " << objectKey << "\nis empty!"
266  << "\nNo physics algorithms are found for this menu.";
267  }
268 
269  TableMenuAlgo menuAlgo;
270  int resultsMenuAlgoRows = resultsMenuAlgo.numberRows();
271 
272  for (int iRow = 0; iRow < resultsMenuAlgoRows; ++iRow) {
273  for (std::vector<std::string>::const_iterator constIt = columnsMenuAlgo.begin(); constIt != columnsMenuAlgo.end();
274  ++constIt) {
275  if ((*constIt) == "ALGO_INDEX") {
276  resultsMenuAlgo.fillVariableFromRow(*constIt, iRow, menuAlgo.bitNumberSh);
277 
278  } else if ((*constIt) == "NAME") {
279  resultsMenuAlgo.fillVariableFromRow(*constIt, iRow, menuAlgo.algName);
280 
281  } else if ((*constIt) == "ALIAS") {
282  resultsMenuAlgo.fillVariableFromRow(*constIt, iRow, menuAlgo.algAlias);
283 
284  } else if ((*constIt) == "LOGICEXPR") {
285  resultsMenuAlgo.fillVariableFromRow(*constIt, iRow, menuAlgo.logExpression);
286 
287  } else {
288  // do nothing
289  }
290  }
291 
292  LogTrace("L1GtTriggerMenuConfigOnlineProd")
293  << "Row " << iRow << ": index = " << menuAlgo.bitNumberSh << " algName = " << menuAlgo.algName
294  << " algAlias = " << menuAlgo.algAlias << " logExpression = '" << menuAlgo.logExpression << "'" << std::endl;
295 
296  m_tableMenuAlgo.push_back(menuAlgo);
297  }
298 
299  if (m_isDebugEnabled) {
300  LogTrace("L1GtTriggerMenuConfigOnlineProd")
301  << "\n Number of rows read from L1T_MENU_ALGO_VIEW: " << resultsMenuAlgoRows << std::endl;
302  }
303 
304  return true;
305 }
306 
307 // retrieve table with conditions associated to physics algorithms from DB
309  const std::string& objectKey) {
310  // get list of conditions associated with the algorithms
311 
312  // select * from CMS_GT.L1T_MENU_ALGO_COND_VIEW
313  // where L1T_MENU_ALGO_COND_VIEW.MENU_IMPLEMENTATION = objectKey
314 
315  const std::vector<std::string>& columnsMenuAlgoCond =
316  m_omdsReader.columnNamesView(gtSchema, "L1T_MENU_ALGO_COND_VIEW");
317 
318  if (m_isDebugEnabled) {
319  LogTrace("L1GtTriggerMenuConfigOnlineProd") << "\n List of columns in L1T_MENU_ALGO_COND_VIEW:\n" << std::endl;
320  for (std::vector<std::string>::const_iterator iter = columnsMenuAlgoCond.begin(); iter != columnsMenuAlgoCond.end();
321  iter++) {
322  LogTrace("L1GtTriggerMenuConfigOnlineProd") << (*iter) << std::endl;
323  }
324  LogTrace("L1GtTriggerMenuConfigOnlineProd") << "\n\n" << std::endl;
325  }
326 
327  l1t::OMDSReader::QueryResults resultsMenuAlgoCond =
328  m_omdsReader.basicQueryView(columnsMenuAlgoCond,
329  gtSchema,
330  "L1T_MENU_ALGO_COND_VIEW",
331  "L1T_MENU_ALGO_COND_VIEW.MENU_IMPLEMENTATION",
332  m_omdsReader.singleAttribute(objectKey));
333 
334  // check if query was successful is based on size of returned list
335  // BUT one can have menus w/o algorithms and conditions - no error for empty list, but a warning!
336  if (resultsMenuAlgoCond.queryFailed()) {
337  edm::LogWarning("L1-O2O") << "Warning: Content of L1T_MENU_ALGO_COND_VIEW for L1GtTriggerMenu implementation key: "
338  << "\n " << objectKey << "\nis empty!"
339  << "\nNo list of condition associated to each algorithm are found for this menu.";
340  }
341 
342  //
343  TableMenuAlgoCond menuAlgoCond;
344  int resultsMenuAlgoCondRows = resultsMenuAlgoCond.numberRows();
345 
346  for (int iRow = 0; iRow < resultsMenuAlgoCondRows; ++iRow) {
347  for (std::vector<std::string>::const_iterator constIt = columnsMenuAlgoCond.begin();
348  constIt != columnsMenuAlgoCond.end();
349  ++constIt) {
350  if ((*constIt) == "ALGO_INDEX") {
351  resultsMenuAlgoCond.fillVariableFromRow(*constIt, iRow, menuAlgoCond.bitNumberSh);
352 
353  } else if ((*constIt) == "COND_INDEX") {
354  resultsMenuAlgoCond.fillVariableFromRow(*constIt, iRow, menuAlgoCond.condIndexF);
355 
356  } else if ((*constIt) == "COND_FK") {
357  resultsMenuAlgoCond.fillVariableFromRow(*constIt, iRow, menuAlgoCond.condFK);
358 
359  } else {
360  // do nothing
361  }
362  }
363 
364  LogTrace("L1GtTriggerMenuConfigOnlineProd")
365  << "Row " << iRow << ": ALGO_INDEX = " << menuAlgoCond.bitNumberSh
366  << " COND_INDEX = " << menuAlgoCond.condIndexF << " COND_FK = " << menuAlgoCond.condFK << std::endl;
367 
368  m_tableMenuAlgoCond.push_back(menuAlgoCond);
369  }
370 
371  if (m_isDebugEnabled) {
372  LogTrace("L1GtTriggerMenuConfigOnlineProd")
373  << "\n Number of rows read from L1T_MENU_ALGO_COND_VIEW: " << resultsMenuAlgoCondRows << std::endl;
374  }
375 
376  return true;
377 }
378 
379 // retrieve table with list of conditions in the menu
381  // select * from CMS_GT.L1T_MENU_COND_VIEW
382  // where L1T_MENU_COND_VIEW.MENU_IMPLEMENTATION = objectKey
383 
384  const std::vector<std::string>& columnsMenuCond = m_omdsReader.columnNamesView(gtSchema, "L1T_MENU_COND_VIEW");
385 
386  if (m_isDebugEnabled) {
387  LogTrace("L1GtTriggerMenuConfigOnlineProd") << "\n List of columns in L1T_MENU_COND_VIEW:\n" << std::endl;
388  for (std::vector<std::string>::const_iterator iter = columnsMenuCond.begin(); iter != columnsMenuCond.end();
389  iter++) {
390  LogTrace("L1GtTriggerMenuConfigOnlineProd") << (*iter) << std::endl;
391  }
392  LogTrace("L1GtTriggerMenuConfigOnlineProd") << "\n\n" << std::endl;
393  }
394 
395  l1t::OMDSReader::QueryResults resultsMenuCond = m_omdsReader.basicQueryView(columnsMenuCond,
396  gtSchema,
397  "L1T_MENU_COND_VIEW",
398  "L1T_MENU_COND_VIEW.MENU_IMPLEMENTATION",
399  m_omdsReader.singleAttribute(objectKey));
400 
401  // check if query was successful is based on size of returned list
402  // BUT one can have menus w/o conditions - no error for empty list, but a warning!
403  if (resultsMenuCond.queryFailed()) {
404  edm::LogWarning("L1-O2O") << "Warning: Content of L1T_MENU_COND_VIEW for L1GtTriggerMenu implementation key: "
405  << "\n " << objectKey << "\nis empty!"
406  << "\nNo conditions associated to menu are found for this menu.";
407  }
408 
409  //
410  TableMenuCond menuCond;
411  int resultsMenuCondRows = resultsMenuCond.numberRows();
412 
413  for (int iRow = 0; iRow < resultsMenuCondRows; ++iRow) {
414  for (std::vector<std::string>::const_iterator constIt = columnsMenuCond.begin(); constIt != columnsMenuCond.end();
415  ++constIt) {
416  if ((*constIt) == "COND") {
417  resultsMenuCond.fillVariableFromRow(*constIt, iRow, menuCond.cond);
418 
419  } else if ((*constIt) == "COND_CATEGORY") {
420  resultsMenuCond.fillVariableFromRow(*constIt, iRow, menuCond.condCategory);
421 
422  } else if ((*constIt) == "COND_TYPE") {
423  resultsMenuCond.fillVariableFromRow(*constIt, iRow, menuCond.condType);
424 
425  } else if ((*constIt) == "GT_OBJECT_1") {
426  resultsMenuCond.fillVariableFromRow(*constIt, iRow, menuCond.gtObject1);
427 
428  } else if ((*constIt) == "GT_OBJECT_2") {
429  resultsMenuCond.fillVariableFromRow(*constIt, iRow, menuCond.gtObject2);
430 
431  } else if ((*constIt) == "COND_GEQ") {
432  //float condGEqFloat = -1;
433  //resultsMenuCond.fillVariableFromRow(*constIt, iRow, condGEqFloat);
434  //menuCond.condGEq = (condGEqFloat > 0.5) ? true : false;
435  resultsMenuCond.fillVariableFromRow(*constIt, iRow, menuCond.condGEq);
436 
437  } else if ((*constIt) == "COUNT_INDEX") {
438  resultsMenuCond.fillVariableFromRow(*constIt, iRow, menuCond.countIndex);
439 
440  } else if ((*constIt) == "COUNT_THRESHOLD") {
441  resultsMenuCond.fillVariableFromRow(*constIt, iRow, menuCond.countThreshold);
442 
443  } else if ((*constIt) == "CHARGE_CORRELATION") {
444  resultsMenuCond.fillVariableFromRow(*constIt, iRow, menuCond.chargeCorrelation);
445 
446  } else if ((*constIt) == "OBJECT_PARAMETER_1_FK") {
447  resultsMenuCond.fillVariableFromRow(*constIt, iRow, menuCond.objectParameter1FK);
448 
449  } else if ((*constIt) == "OBJECT_PARAMETER_2_FK") {
450  resultsMenuCond.fillVariableFromRow(*constIt, iRow, menuCond.objectParameter2FK);
451 
452  } else if ((*constIt) == "OBJECT_PARAMETER_3_FK") {
453  resultsMenuCond.fillVariableFromRow(*constIt, iRow, menuCond.objectParameter3FK);
454 
455  } else if ((*constIt) == "OBJECT_PARAMETER_4_FK") {
456  resultsMenuCond.fillVariableFromRow(*constIt, iRow, menuCond.objectParameter4FK);
457 
458  } else if ((*constIt) == "DELTA_ETA_RANGE") {
459  resultsMenuCond.fillVariableFromRow(*constIt, iRow, menuCond.deltaEtaRange);
460 
461  } else if ((*constIt) == "DELTA_PHI_RANGE") {
462  resultsMenuCond.fillVariableFromRow(*constIt, iRow, menuCond.deltaPhiRange);
463 
464  } else {
465  // do nothing
466  }
467  }
468 
469  LogTrace("L1GtTriggerMenuConfigOnlineProd")
470  << " COND " << menuCond.cond << " COND_CATEGORY " << menuCond.condCategory << " COND_TYPE " << menuCond.condType
471  << " GT_OBJECT_1 " << menuCond.gtObject1 << " GT_OBJECT_2 " << menuCond.gtObject2 << " COND_GEQ "
472  << menuCond.condGEq << "\n"
473  << " COUNT_INDEX " << menuCond.countIndex << " COUNT_THRESHOLD " << menuCond.countThreshold << "\n"
474  << " CHARGE_CORRELATION " << menuCond.chargeCorrelation << "\n"
475  << " OBJECT_PARAMETER_1_FK " << menuCond.objectParameter1FK << " OBJECT_PARAMETER_2_FK "
476  << menuCond.objectParameter2FK << " OBJECT_PARAMETER_3_FK " << menuCond.objectParameter3FK
477  << " OBJECT_PARAMETER_4_FK " << menuCond.objectParameter4FK << "\n"
478  << " DELTA_ETA_RANGE " << menuCond.deltaEtaRange << " DELTA_PHI_RANGE " << menuCond.deltaPhiRange;
479 
480  m_tableMenuCond.push_back(menuCond);
481  }
482 
483  if (m_isDebugEnabled) {
484  LogTrace("L1GtTriggerMenuConfigOnlineProd")
485  << "\n Number of rows read from L1T_MENU_COND_VIEW: " << resultsMenuCondRows << std::endl;
486  }
487 
488  return true;
489 }
490 
491 // retrieve table with object parameters from DB
493  const std::string& objectKey) {
494  // get the list of object parameters in the menu
495 
496  // select * from CMS_GT.L1T_MENU_OP_VIEW
497  // where L1T_MENU_OP_VIEW.MENU_IMPLEMENTATION = objectKey
498 
499  const std::vector<std::string>& columnsMenuOp = m_omdsReader.columnNamesView(gtSchema, "L1T_MENU_OP_VIEW");
500 
501  if (m_isDebugEnabled) {
502  LogTrace("L1GtTriggerMenuConfigOnlineProd") << "\n List of columns in L1T_MENU_OP_VIEW:\n" << std::endl;
503  for (std::vector<std::string>::const_iterator iter = columnsMenuOp.begin(); iter != columnsMenuOp.end(); iter++) {
504  LogTrace("L1GtTriggerMenuConfigOnlineProd") << (*iter) << std::endl;
505  }
506  LogTrace("L1GtTriggerMenuConfigOnlineProd") << "\n\n" << std::endl;
507  }
508 
509  l1t::OMDSReader::QueryResults resultsMenuOp = m_omdsReader.basicQueryView(columnsMenuOp,
510  gtSchema,
511  "L1T_MENU_OP_VIEW",
512  "L1T_MENU_OP_VIEW.MENU_IMPLEMENTATION",
513  m_omdsReader.singleAttribute(objectKey));
514 
515  // check if query was successful is based on size of returned list
516  // BUT one can have menus w/o object parameters - no error for empty list, but a warning!
517  if (resultsMenuOp.queryFailed()) {
518  edm::LogWarning("L1-O2O") << "Warning: Content of L1T_MENU_OP_VIEW for L1GtTriggerMenu implementation key: "
519  << "\n " << objectKey << "\nis empty!"
520  << "\nNo object parameters associated to menu are found for this menu.";
521  }
522 
523  TableMenuObjectParameters menuObjectParameters;
524  int resultsMenuOpRows = resultsMenuOp.numberRows();
525 
526  for (int iRow = 0; iRow < resultsMenuOpRows; ++iRow) {
527  for (std::vector<std::string>::const_iterator constIt = columnsMenuOp.begin(); constIt != columnsMenuOp.end();
528  ++constIt) {
529  if ((*constIt) == "ID") {
530  resultsMenuOp.fillVariableFromRow(*constIt, iRow, menuObjectParameters.opId);
531 
532  } else if ((*constIt) == "PT_HIGH_THRESHOLD") {
533  resultsMenuOp.fillVariableFromRow(*constIt, iRow, menuObjectParameters.ptHighThreshold);
534 
535  } else if ((*constIt) == "PT_LOW_THRESHOLD") {
536  resultsMenuOp.fillVariableFromRow(*constIt, iRow, menuObjectParameters.ptLowThreshold);
537 
538  } else if ((*constIt) == "ENABLE_MIP") {
539  resultsMenuOp.fillVariableFromRow(*constIt, iRow, menuObjectParameters.enableMip);
540 
541  } else if ((*constIt) == "ENABLE_ISO") {
542  resultsMenuOp.fillVariableFromRow(*constIt, iRow, menuObjectParameters.enableIso);
543 
544  } else if ((*constIt) == "REQUEST_ISO") {
545  resultsMenuOp.fillVariableFromRow(*constIt, iRow, menuObjectParameters.requestIso);
546 
547  } else if ((*constIt) == "ENERGY_OVERFLOW") {
548  resultsMenuOp.fillVariableFromRow(*constIt, iRow, menuObjectParameters.energyOverflow);
549 
550  } else if ((*constIt) == "ET_THRESHOLD") {
551  resultsMenuOp.fillVariableFromRow(*constIt, iRow, menuObjectParameters.etThreshold);
552 
553  } else if ((*constIt) == "ETA_RANGE") {
554  resultsMenuOp.fillVariableFromRow(*constIt, iRow, menuObjectParameters.etaRange);
555 
556  } else if ((*constIt) == "PHI_RANGE") {
557  resultsMenuOp.fillVariableFromRow(*constIt, iRow, menuObjectParameters.phiRange);
558 
559  } else if ((*constIt) == "PHI_LOW") {
560  resultsMenuOp.fillVariableFromRow(*constIt, iRow, menuObjectParameters.phiLow);
561 
562  } else if ((*constIt) == "PHI_HIGH") {
563  resultsMenuOp.fillVariableFromRow(*constIt, iRow, menuObjectParameters.phiHigh);
564 
565  } else if ((*constIt) == "QUALITY_RANGE") {
566  resultsMenuOp.fillVariableFromRow(*constIt, iRow, menuObjectParameters.qualityRange);
567 
568  } else if ((*constIt) == "CHARGE") {
569  resultsMenuOp.fillVariableFromRow(*constIt, iRow, menuObjectParameters.charge);
570 
571  } else {
572  // do nothing
573  }
574  }
575 
576  LogTrace("L1GtTriggerMenuConfigOnlineProd")
577  << " ID " << menuObjectParameters.opId << " PT_HIGH_THRESHOLD " << menuObjectParameters.ptHighThreshold
578  << " PT_LOW_THRESHOLD " << menuObjectParameters.ptLowThreshold << " ENABLE_MIP "
579  << menuObjectParameters.enableMip << " ENABLE_ISO " << menuObjectParameters.enableIso << " REQUEST_ISO "
580  << menuObjectParameters.requestIso << " ENERGY_OVERFLOW " << menuObjectParameters.energyOverflow
581  << " ET_THRESHOLD " << menuObjectParameters.etThreshold << " ETA_RANGE " << menuObjectParameters.etaRange
582  << " PHI_RANGE " << menuObjectParameters.phiRange << " PHI_LOW " << menuObjectParameters.phiLow << " PHI_HIGH "
583  << menuObjectParameters.phiHigh << " QUALITY_RANGE " << menuObjectParameters.qualityRange << " CHARGE "
584  << menuObjectParameters.charge << std::endl;
585 
586  m_tableMenuObjectParameters.push_back(menuObjectParameters);
587  }
588 
589  if (m_isDebugEnabled) {
590  LogTrace("L1GtTriggerMenuConfigOnlineProd")
591  << "\n Number of rows read from L1T_MENU_OP_VIEW: " << resultsMenuOpRows << std::endl;
592  }
593 
594  return true;
595 }
596 
597 // retrieve table with technical triggers from DB
599  const std::string& objectKey) {
600  // select * from CMS_GT.L1T_MENU_TECHTRIG_VIEW
601  // where L1T_MENU_TECHTRIG_VIEW.MENU_IMPLEMENTATION = objectKey
602 
603  const std::vector<std::string>& columnsMenuTechTrig =
604  m_omdsReader.columnNamesView(gtSchema, "L1T_MENU_TECHTRIG_VIEW");
605 
606  if (m_isDebugEnabled) {
607  LogTrace("L1GtTriggerMenuConfigOnlineProd") << "\n List of columns in L1T_MENU_TECHTRIG_VIEW:\n" << std::endl;
608  for (std::vector<std::string>::const_iterator iter = columnsMenuTechTrig.begin(); iter != columnsMenuTechTrig.end();
609  iter++) {
610  LogTrace("L1GtTriggerMenuConfigOnlineProd") << (*iter) << std::endl;
611  }
612  LogTrace("L1GtTriggerMenuConfigOnlineProd") << "\n\n" << std::endl;
613  }
614 
615  l1t::OMDSReader::QueryResults resultsMenuTechTrig =
616  m_omdsReader.basicQueryView(columnsMenuTechTrig,
617  gtSchema,
618  "L1T_MENU_TECHTRIG_VIEW",
619  "L1T_MENU_TECHTRIG_VIEW.MENU_IMPLEMENTATION",
620  m_omdsReader.singleAttribute(objectKey));
621 
622  // check if query was successful is based on size of returned list
623  // BUT one can have menus w/o technical triggers - no error for empty list, but a warning!
624  if (resultsMenuTechTrig.queryFailed()) {
625  edm::LogWarning("L1-O2O") << "Warning: Content of L1T_MENU_TECHTRIG_VIEW for L1GtTriggerMenu implementation key: "
626  << "\n " << objectKey << "\nis empty!"
627  << "\nNo technical triggers are found for this menu.";
628  }
629 
630  TableMenuTechTrig menuTechTrig;
631  int resultsMenuTechTrigRows = resultsMenuTechTrig.numberRows();
632 
633  for (int iRow = 0; iRow < resultsMenuTechTrigRows; ++iRow) {
634  for (std::vector<std::string>::const_iterator constIt = columnsMenuTechTrig.begin();
635  constIt != columnsMenuTechTrig.end();
636  ++constIt) {
637  if ((*constIt) == "TECHTRIG_INDEX") {
638  resultsMenuTechTrig.fillVariableFromRow(*constIt, iRow, menuTechTrig.bitNumberSh);
639 
640  } else if ((*constIt) == "NAME") {
641  resultsMenuTechTrig.fillVariableFromRow(*constIt, iRow, menuTechTrig.techName);
642 
643  } else {
644  // do nothing
645  }
646  }
647 
648  LogTrace("L1GtTriggerMenuConfigOnlineProd") << "Row " << iRow << ": index = " << menuTechTrig.bitNumberSh
649  << " techName = " << menuTechTrig.techName << std::endl;
650 
651  m_tableMenuTechTrig.push_back(menuTechTrig);
652  }
653 
654  if (m_isDebugEnabled) {
655  LogTrace("L1GtTriggerMenuConfigOnlineProd")
656  << "\n Number of rows read from L1T_MENU_TECHTRIG_VIEW: " << resultsMenuTechTrigRows << std::endl;
657  }
658 
659  return true;
660 }
661 
662 // return for an algorithm with bitNr the mapping between the integer index in logical expression
663 // and the condition name (FK)
664 const std::map<int, std::string> L1GtTriggerMenuConfigOnlineProd::condIndexNameMap(const short bitNr) const {
665  std::map<int, std::string> mapIndexName;
666 
667  for (std::vector<TableMenuAlgoCond>::const_iterator constIt = m_tableMenuAlgoCond.begin();
668  constIt != m_tableMenuAlgoCond.end();
669  ++constIt) {
670  if (bitNr == (*constIt).bitNumberSh) {
671  mapIndexName[static_cast<int>((*constIt).condIndexF)] = (*constIt).condFK;
672  }
673  }
674 
675  if (m_isDebugEnabled) {
676  LogTrace("L1GtTriggerMenuConfigOnlineProd") << "\n Bit number : " << bitNr << std::endl;
677 
678  for (std::map<int, std::string>::const_iterator constIt = mapIndexName.begin(); constIt != mapIndexName.end();
679  ++constIt) {
680  LogTrace("L1GtTriggerMenuConfigOnlineProd")
681  << " Condition index -> name: " << ((*constIt).first) << " " << ((*constIt).second) << std::endl;
682  }
683  }
684 
685  return mapIndexName;
686 }
687 
688 // convert a logical expression with indices to a logical expression with names
690  const std::string& expressionIndices, const std::map<int, std::string>& mapCondIndexName) const {
691  std::string expressionNames;
692 
693  L1GtLogicParser parserIndices = L1GtLogicParser(expressionIndices);
694  parserIndices.convertIntToNameLogicalExpression(mapCondIndexName);
695  expressionNames = parserIndices.logicalExpression();
696 
697  return expressionNames;
698 }
699 
700 // return the chip number for an algorithm with index bitNumberSh
701 int L1GtTriggerMenuConfigOnlineProd::chipNumber(short bitNumberSh) const {
702  // FIXME get it from Event Setup
703  const unsigned numberConditionChips = 2;
704  const unsigned pinsOnConditionChip = 96;
705  std::vector<int> orderConditionChip;
706  orderConditionChip.push_back(2);
707  orderConditionChip.push_back(1);
708 
709  int posChip = (static_cast<unsigned>(bitNumberSh) / pinsOnConditionChip) + 1;
710  for (unsigned int iChip = 0; iChip < numberConditionChips; ++iChip) {
711  if (posChip == orderConditionChip[iChip]) {
712  return static_cast<int>(iChip);
713  }
714  }
715 
716  // chip number not found
717  return -1;
718 }
719 
720 // build the algorithm map in the menu
722  // temporary value
723  int bitNumber = -1;
724  std::string logicalExpression;
725 
726  // loop over m_tableMenuAlgo
727  for (std::vector<TableMenuAlgo>::const_iterator constIt = m_tableMenuAlgo.begin(); constIt != m_tableMenuAlgo.end();
728  constIt++) {
729  bitNumber = static_cast<int>((*constIt).bitNumberSh);
730 
731  const std::map<int, std::string>& condIndexName = condIndexNameMap((*constIt).bitNumberSh);
732  logicalExpression = convertLogicalExpression((*constIt).logExpression, condIndexName);
733 
734  // create a new algorithm and insert it into algorithm map
735  L1GtAlgorithm alg((*constIt).algName, logicalExpression, bitNumber);
736  alg.setAlgoAlias((*constIt).algAlias);
737 
738  // set algorithm chip number:
739  int algChipNr = chipNumber((*constIt).bitNumberSh);
740  alg.setAlgoChipNumber(algChipNr);
741 
742  // insert algorithm
743  m_algorithmMap[(*constIt).algName] = alg;
744  m_algorithmAliasMap[(*constIt).algAlias] = alg;
745  }
746 }
747 
748 // build the technical trigger map in the menu
750  // temporary value
751  int bitNumber = -1;
752  std::string logicalExpression;
753 
754  // loop over m_tableMenuTechTrig
755  for (std::vector<TableMenuTechTrig>::const_iterator constIt = m_tableMenuTechTrig.begin();
756  constIt != m_tableMenuTechTrig.end();
757  constIt++) {
758  bitNumber = static_cast<int>((*constIt).bitNumberSh);
759 
760  // create a new technical trigger and insert it into technical trigger map
761  // technical triggers have L1GtAlgorithm class
762  L1GtAlgorithm techTrig((*constIt).techName, logicalExpression, bitNumber);
763 
764  // chip number set in constructor to -1 - no meaning for technical triggers
765 
766  // insert technical trigger
767  m_technicalTriggerMap[(*constIt).techName] = techTrig;
768 
769  // no alias is defined for technical triggers
770  }
771 }
772 
774  if (strCategory == "CondMuon") {
775  return CondMuon;
776  } else if (strCategory == "CondCalo") {
777  return CondCalo;
778  } else if (strCategory == "CondEnergySum") {
779  return CondEnergySum;
780  } else if (strCategory == "CondJetCounts") {
781  return CondJetCounts;
782  } else if (strCategory == "CondCorrelation") {
783  return CondCorrelation;
784  } else if (strCategory == "CondCastor") {
785  return CondCastor;
786  } else if (strCategory == "CondHfBitCounts") {
787  return CondHfBitCounts;
788  } else if (strCategory == "CondHfRingEtSums") {
789  return CondHfRingEtSums;
790  } else if (strCategory == "CondBptx") {
791  return CondBptx;
792  } else if (strCategory == "CondExternal") {
793  return CondExternal;
794  } else if (strCategory == "CondNull") {
795  return CondNull;
796  } else {
797  edm::LogWarning("L1GtTriggerMenuConfigOnlineProd")
798  << "\n Warning: string " << strCategory << " not defined. Returning CondNull.\n"
799  << std::endl;
800  return CondNull;
801  }
802 
803  return CondNull;
804 }
805 
806 // string to enum L1GtConditionType conversion
808  if (strType == "1s") {
809  return Type1s;
810  } else if (strType == "2s") {
811  return Type2s;
812  } else if (strType == "2wsc") {
813  return Type2wsc;
814  } else if (strType == "2cor") {
815  return Type2cor;
816  } else if (strType == "3s") {
817  return Type3s;
818  } else if (strType == "4s") {
819  return Type4s;
820  } else if (strType == "ETM") {
821  return TypeETM;
822  } else if (strType == "ETT") {
823  return TypeETT;
824  } else if (strType == "HTT") {
825  return TypeHTT;
826  } else if (strType == "HTM") {
827  return TypeHTM;
828  } else if (strType == "JetCounts") {
829  return TypeJetCounts;
830  } else if (strType == "Castor") {
831  return TypeCastor;
832  } else if (strType == "HfBitCounts") {
833  return TypeHfBitCounts;
834  } else if (strType == "HfRingEtSums") {
835  return TypeHfRingEtSums;
836  } else if (strType == "Bptx") {
837  return TypeBptx;
838  } else if (strType == "TypeExternal") {
839  return TypeExternal;
840  } else {
841  edm::LogWarning("L1GtTriggerMenuConfigOnlineProd")
842  << "\n Warning: string " << strType << " not associated to any L1GtConditionType. Returning TypeNull.\n"
843  << std::endl;
844  return TypeNull;
845  }
846 
847  return TypeNull;
848 }
849 
850 // string to enum L1GtObject conversion
852  if (strObject == "Mu") {
853  return Mu;
854  } else if (strObject == "NoIsoEG") {
855  return NoIsoEG;
856  } else if (strObject == "IsoEG") {
857  return IsoEG;
858  } else if (strObject == "CenJet") {
859  return CenJet;
860  } else if (strObject == "ForJet") {
861  return ForJet;
862  } else if (strObject == "TauJet") {
863  return TauJet;
864  } else if (strObject == "ETM") {
865  return ETM;
866  } else if (strObject == "ETT") {
867  return ETT;
868  } else if (strObject == "HTT") {
869  return HTT;
870  } else if (strObject == "HTM") {
871  return HTM;
872  } else if (strObject == "JetCounts") {
873  return JetCounts;
874  } else if (strObject == "HfBitCounts") {
875  return HfBitCounts;
876  } else if (strObject == "HfRingEtSums") {
877  return HfRingEtSums;
878  } else if (strObject == "TechTrig") {
879  return TechTrig;
880  } else if (strObject == "Castor") {
881  return Castor;
882  } else if (strObject == "BPTX") {
883  return BPTX;
884  } else if (strObject == "GtExternal") {
885  return GtExternal;
886  } else {
887  edm::LogWarning("L1GtTriggerMenuConfigOnlineProd")
888  << "\n Warning: string " << strObject << " not associated to any L1GtObject. Returning Mu (no Null type).\n"
889  << std::endl;
890  return Mu;
891  }
892 
893  // no null type, so returning Mu - should never arrive here
894  return Mu;
895 }
896 
898  std::string& hex0WordStr,
899  std::string& hex1WordStr) {
900  unsigned int lenHexStr = hexStr.length();
901 
902  if (lenHexStr < 3) {
903  LogTrace("L1GtTriggerMenuConfigOnlineProd") << "\n Warning: string " << hexStr << " has length less than 3."
904  << "\n Not possible to split it in two 64-bit words."
905  << "\n Return two zero strings." << std::endl;
906  hex0WordStr = "0x0";
907  hex1WordStr = "0x0";
908 
909  return;
910  }
911 
912  unsigned int lenHex = lenHexStr - 2;
913  unsigned int len0Word = lenHex > 16 ? 16 : lenHex;
914  unsigned int len1Word = lenHex - len0Word;
915 
916  unsigned int pos0Word = lenHexStr - len0Word;
917  hex0WordStr = "0x" + hexStr.substr(pos0Word, len0Word);
918 
919  if (len1Word > 0) {
920  unsigned int pos1Word = pos0Word - len1Word;
921  hex1WordStr = "0x" + hexStr.substr(pos1Word, len1Word);
922  } else {
923  hex1WordStr = "0x0";
924  }
925 }
926 
927 // get a list of chip numbers from the m_tableMenuAlgoCond table for a condition
929  std::list<int> chipList;
930 
931  // loop over m_tableMenuAlgoCond
932  for (std::vector<TableMenuAlgoCond>::const_iterator constIt = m_tableMenuAlgoCond.begin();
933  constIt != m_tableMenuAlgoCond.end();
934  constIt++) {
935  if (condFK == (*constIt).condFK) {
936  int chipNr = chipNumber((*constIt).bitNumberSh);
937  chipList.push_back(chipNr);
938  }
939  }
940 
941  return chipList;
942 }
943 
946  // loop over m_tableMenuCond
947  for (std::vector<TableMenuObjectParameters>::const_iterator constIt = m_tableMenuObjectParameters.begin();
948  constIt != m_tableMenuObjectParameters.end();
949  constIt++) {
950  if (opFK == (*constIt).opId) {
951  objPar.ptHighThreshold = static_cast<unsigned int>((*constIt).ptHighThreshold);
952  objPar.ptLowThreshold = static_cast<unsigned int>((*constIt).ptLowThreshold);
953  objPar.enableMip = static_cast<bool>((*constIt).enableMip);
954  objPar.enableIso = static_cast<bool>((*constIt).enableIso);
955  objPar.requestIso = static_cast<bool>((*constIt).requestIso);
956  objPar.etaRange = lexical_cast_from_hex<unsigned long long>((*constIt).etaRange);
957  objPar.phiHigh = static_cast<unsigned int>((*constIt).phiHigh);
958  objPar.phiLow = static_cast<unsigned int>((*constIt).phiLow);
959  objPar.qualityRange = lexical_cast_from_hex<unsigned int>((*constIt).qualityRange);
960  //objPar.charge = static_cast<unsigned int> ( ( *constIt ).charge);
961 
962  // can break after it is found - DB consistency
963  break;
964  }
965  }
966 }
967 
969  L1GtMuonTemplate muonCond(condDB.cond);
970  muonCond.setCondType(strToEnumCondType(condDB.condType));
971 
972  // object types - all muons
973  int nrObj = muonCond.nrObjects();
974  std::vector<L1GtObject> objType(nrObj, Mu);
975  muonCond.setObjectType(objType);
976 
977  muonCond.setCondGEq(condDB.condGEq);
978 
979  // temporary storage of the parameters
980  std::vector<L1GtMuonTemplate::ObjectParameter> objParameter(nrObj);
981 
982  for (int iObj = 0; iObj < nrObj; ++iObj) {
983  if (iObj == 0) {
984  fillMuonObjectParameter(condDB.objectParameter1FK, objParameter[iObj]);
985  } else if (iObj == 1) {
986  fillMuonObjectParameter(condDB.objectParameter2FK, objParameter[iObj]);
987  } else if (iObj == 2) {
988  fillMuonObjectParameter(condDB.objectParameter3FK, objParameter[iObj]);
989  } else if (iObj == 3) {
990  fillMuonObjectParameter(condDB.objectParameter4FK, objParameter[iObj]);
991  } else {
992  LogTrace("L1GtTriggerMenuConfigOnlineProd")
993  << "\n Warning: number of objects requested " << nrObj << " not available in DB."
994  << "\n Maximum 4 object parameters implemented. \n"
995  << std::endl;
996  }
997  }
998 
1000  corrParameter.chargeCorrelation = static_cast<unsigned int>(condDB.chargeCorrelation);
1001  if (muonCond.wsc()) {
1002  corrParameter.deltaEtaRange = lexical_cast_from_hex<unsigned long long>(condDB.deltaEtaRange);
1003 
1004  std::string word0;
1005  std::string word1;
1006  splitHexStringInTwo64bitWords(condDB.deltaPhiRange, word0, word1);
1007 
1008  corrParameter.deltaPhiRange0Word = lexical_cast_from_hex<unsigned long long>(word0);
1009  corrParameter.deltaPhiRange1Word = lexical_cast_from_hex<unsigned long long>(word1);
1010 
1011  corrParameter.deltaPhiMaxbits = 0; // not used anymore
1012  }
1013 
1014  muonCond.setConditionParameter(objParameter, corrParameter);
1015 
1016  // get chip number list
1017  std::list<int> chipList = listChipNumber(condDB.cond);
1018 
1019  // eliminate duplicates
1020  chipList.sort();
1021  chipList.unique();
1022 
1023  // add the same condition once to every chip where required
1024  for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1025  muonCond.setCondChipNr(*itChip);
1026 
1027  // no check for uniqueness - done by DB
1028  (m_vecMuonTemplate[*itChip]).push_back(muonCond);
1029 
1030  if (m_isDebugEnabled) {
1031  LogTrace("L1GtTriggerMenuConfigOnlineProd")
1032  << "\n Adding condition " << (condDB.cond) << " on chip " << (*itChip) << "\n " << std::endl;
1033 
1034  LogTrace("L1GtTriggerMenuConfigOnlineProd") << muonCond << "\n" << std::endl;
1035  }
1036  }
1037 }
1038 
1041  // loop over m_tableMenuCond
1042  for (std::vector<TableMenuObjectParameters>::const_iterator constIt = m_tableMenuObjectParameters.begin();
1043  constIt != m_tableMenuObjectParameters.end();
1044  constIt++) {
1045  if (opFK == (*constIt).opId) {
1046  objPar.etThreshold = static_cast<unsigned int>((*constIt).etThreshold);
1047  objPar.etaRange = lexical_cast_from_hex<unsigned int>((*constIt).etaRange);
1048  objPar.phiRange = lexical_cast_from_hex<unsigned int>((*constIt).phiRange);
1049 
1050  // can break after it is found - DB consistency
1051  break;
1052  }
1053  }
1054 }
1055 
1057  L1GtCaloTemplate caloCond(condDB.cond);
1058  caloCond.setCondType(strToEnumCondType(condDB.condType));
1059 
1060  // object types - all have the same type, so reading it for first object is OK
1061  int nrObj = caloCond.nrObjects();
1062 
1064  std::vector<L1GtObject> objType(nrObj, obj);
1065  caloCond.setObjectType(objType);
1066 
1067  caloCond.setCondGEq(condDB.condGEq);
1068 
1069  // temporary storage of the parameters
1070  std::vector<L1GtCaloTemplate::ObjectParameter> objParameter(nrObj);
1071 
1072  for (int iObj = 0; iObj < nrObj; ++iObj) {
1073  if (iObj == 0) {
1074  fillCaloObjectParameter(condDB.objectParameter1FK, objParameter[iObj]);
1075  } else if (iObj == 1) {
1076  fillCaloObjectParameter(condDB.objectParameter2FK, objParameter[iObj]);
1077  } else if (iObj == 2) {
1078  fillCaloObjectParameter(condDB.objectParameter3FK, objParameter[iObj]);
1079  } else if (iObj == 3) {
1080  fillCaloObjectParameter(condDB.objectParameter4FK, objParameter[iObj]);
1081  } else {
1082  LogTrace("L1GtTriggerMenuConfigOnlineProd")
1083  << "\n Warning: number of objects requested " << nrObj << " not available in DB."
1084  << "\n Maximum 4 object parameters implemented. \n"
1085  << std::endl;
1086  }
1087  }
1088 
1090  if (caloCond.wsc()) {
1091  corrParameter.deltaEtaRange = lexical_cast_from_hex<unsigned long long>(condDB.deltaEtaRange);
1092 
1093  corrParameter.deltaPhiRange = lexical_cast_from_hex<unsigned long long>(condDB.deltaPhiRange);
1094  corrParameter.deltaPhiMaxbits = 0; // FIXME check correlations
1095  }
1096 
1097  caloCond.setConditionParameter(objParameter, corrParameter);
1098 
1099  // get chip number list
1100  std::list<int> chipList = listChipNumber(condDB.cond);
1101 
1102  // eliminate duplicates
1103  chipList.sort();
1104  chipList.unique();
1105 
1106  // add the same condition once to every chip where required
1107  for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1108  caloCond.setCondChipNr(*itChip);
1109 
1110  // no check for uniqueness - done by DB
1111  (m_vecCaloTemplate[*itChip]).push_back(caloCond);
1112 
1113  if (m_isDebugEnabled) {
1114  LogTrace("L1GtTriggerMenuConfigOnlineProd")
1115  << "\n Adding condition " << (condDB.cond) << " on chip " << (*itChip) << "\n " << std::endl;
1116 
1117  LogTrace("L1GtTriggerMenuConfigOnlineProd") << caloCond << "\n" << std::endl;
1118  }
1119  }
1120 }
1121 
1124  const L1GtObject& obj) {
1125  // loop over m_tableMenuCond
1126  for (std::vector<TableMenuObjectParameters>::const_iterator constIt = m_tableMenuObjectParameters.begin();
1127  constIt != m_tableMenuObjectParameters.end();
1128  constIt++) {
1129  if (opFK == (*constIt).opId) {
1130  objPar.etThreshold = static_cast<unsigned int>((*constIt).etThreshold);
1131  objPar.energyOverflow = static_cast<bool>((*constIt).energyOverflow); // not used
1132 
1133  std::string word0;
1134  std::string word1;
1135  splitHexStringInTwo64bitWords((*constIt).phiRange, word0, word1);
1136 
1137  if (obj == ETM) {
1138  objPar.phiRange0Word = lexical_cast_from_hex<unsigned long long>(word0);
1139  objPar.phiRange1Word = lexical_cast_from_hex<unsigned long long>(word1);
1140 
1141  } else if (obj == HTM) {
1142  objPar.phiRange0Word = lexical_cast_from_hex<unsigned long long>(word0);
1143  }
1144 
1145  // can break after it is found - DB consistency
1146  break;
1147  }
1148  }
1149 }
1150 
1152  L1GtEnergySumTemplate esumCond(condDB.cond);
1153  esumCond.setCondType(strToEnumCondType(condDB.condType));
1154 
1155  // object types - all energy sums are global - so 1 object
1156  int nrObj = 1;
1157 
1159  std::vector<L1GtObject> objType(nrObj, obj);
1160  esumCond.setObjectType(objType);
1161 
1162  esumCond.setCondGEq(condDB.condGEq);
1163 
1164  // temporary storage of the parameters - no CorrelationParameter
1165  std::vector<L1GtEnergySumTemplate::ObjectParameter> objParameter(nrObj);
1166  fillEnergySumObjectParameter(condDB.objectParameter1FK, objParameter[0], objType[0]);
1167 
1168  esumCond.setConditionParameter(objParameter);
1169 
1170  // get chip number list
1171  std::list<int> chipList = listChipNumber(condDB.cond);
1172 
1173  // eliminate duplicates
1174  chipList.sort();
1175  chipList.unique();
1176 
1177  // add the same condition once to every chip where required
1178  for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1179  esumCond.setCondChipNr(*itChip);
1180 
1181  // no check for uniqueness - done by DB
1182  (m_vecEnergySumTemplate[*itChip]).push_back(esumCond);
1183 
1184  if (m_isDebugEnabled) {
1185  LogTrace("L1GtTriggerMenuConfigOnlineProd")
1186  << "\n Adding condition " << (condDB.cond) << " on chip " << (*itChip) << "\n " << std::endl;
1187 
1188  LogTrace("L1GtTriggerMenuConfigOnlineProd") << esumCond << "\n" << std::endl;
1189  }
1190  }
1191 }
1192 
1194  L1GtJetCountsTemplate jcCond(condDB.cond);
1195  jcCond.setCondType(strToEnumCondType(condDB.condType));
1196 
1197  // object types - jet counts are "global"
1198  int nrObj = 1;
1199 
1201  std::vector<L1GtObject> objType(nrObj, obj);
1202  jcCond.setObjectType(objType);
1203 
1204  jcCond.setCondGEq(condDB.condGEq);
1205 
1206  // temporary storage of the parameters - no CorrelationParameter
1207  // for counts, the DB implementation is without OP, directly in TableMenuCond
1208  std::vector<L1GtJetCountsTemplate::ObjectParameter> objParameter(nrObj);
1209  objParameter.at(0).countIndex = static_cast<unsigned int>(condDB.countIndex);
1210  objParameter.at(0).countThreshold = static_cast<unsigned int>(condDB.countThreshold);
1211  objParameter.at(0).countOverflow = false; // not used
1212 
1213  jcCond.setConditionParameter(objParameter);
1214 
1215  // get chip number list
1216  std::list<int> chipList = listChipNumber(condDB.cond);
1217 
1218  // eliminate duplicates
1219  chipList.sort();
1220  chipList.unique();
1221 
1222  // add the same condition once to every chip where required
1223  for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1224  jcCond.setCondChipNr(*itChip);
1225 
1226  // no check for uniqueness - done by DB
1227  (m_vecJetCountsTemplate[*itChip]).push_back(jcCond);
1228 
1229  if (m_isDebugEnabled) {
1230  LogTrace("L1GtTriggerMenuConfigOnlineProd")
1231  << "\n Adding condition " << (condDB.cond) << " on chip " << (*itChip) << "\n " << std::endl;
1232 
1233  LogTrace("L1GtTriggerMenuConfigOnlineProd") << jcCond << "\n" << std::endl;
1234  }
1235  }
1236 }
1237 
1239  L1GtHfBitCountsTemplate countsCond(condDB.cond);
1240  countsCond.setCondType(strToEnumCondType(condDB.condType));
1241 
1242  // object types - HF bit counts are "global"
1243  int nrObj = 1;
1244 
1246  std::vector<L1GtObject> objType(nrObj, obj);
1247  countsCond.setObjectType(objType);
1248 
1249  countsCond.setCondGEq(condDB.condGEq);
1250 
1251  // temporary storage of the parameters - no CorrelationParameter
1252  // for counts, the DB implementation is without OP, directly in TableMenuCond
1253  std::vector<L1GtHfBitCountsTemplate::ObjectParameter> objParameter(nrObj);
1254  objParameter.at(0).countIndex = static_cast<unsigned int>(condDB.countIndex);
1255  objParameter.at(0).countThreshold = static_cast<unsigned int>(condDB.countThreshold);
1256 
1257  countsCond.setConditionParameter(objParameter);
1258 
1259  // get chip number list
1260  std::list<int> chipList = listChipNumber(condDB.cond);
1261 
1262  // eliminate duplicates
1263  chipList.sort();
1264  chipList.unique();
1265 
1266  // add the same condition once to every chip where required
1267  for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1268  countsCond.setCondChipNr(*itChip);
1269 
1270  // no check for uniqueness - done by DB
1271  (m_vecHfBitCountsTemplate[*itChip]).push_back(countsCond);
1272 
1273  if (m_isDebugEnabled) {
1274  LogTrace("L1GtTriggerMenuConfigOnlineProd")
1275  << "\n Adding condition " << (condDB.cond) << " on chip " << (*itChip) << "\n " << std::endl;
1276 
1277  LogTrace("L1GtTriggerMenuConfigOnlineProd") << countsCond << "\n" << std::endl;
1278  }
1279  }
1280 }
1281 
1283  L1GtHfRingEtSumsTemplate esumCond(condDB.cond);
1284  esumCond.setCondType(strToEnumCondType(condDB.condType));
1285 
1286  // object types - HF energy sums are "global"
1287  int nrObj = 1;
1288 
1290  std::vector<L1GtObject> objType(nrObj, obj);
1291  esumCond.setObjectType(objType);
1292 
1293  esumCond.setCondGEq(condDB.condGEq);
1294 
1295  // temporary storage of the parameters - no CorrelationParameter
1296  // for HF energy sums, the DB implementation is without OP, directly in TableMenuCond
1297  std::vector<L1GtHfRingEtSumsTemplate::ObjectParameter> objParameter(nrObj);
1298  objParameter.at(0).etSumIndex = static_cast<unsigned int>(condDB.countIndex);
1299  objParameter.at(0).etSumThreshold = static_cast<unsigned int>(condDB.countThreshold);
1300 
1301  esumCond.setConditionParameter(objParameter);
1302 
1303  // get chip number list
1304  std::list<int> chipList = listChipNumber(condDB.cond);
1305 
1306  // eliminate duplicates
1307  chipList.sort();
1308  chipList.unique();
1309 
1310  // add the same condition once to every chip where required
1311  for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1312  esumCond.setCondChipNr(*itChip);
1313 
1314  // no check for uniqueness - done by DB
1315  (m_vecHfRingEtSumsTemplate[*itChip]).push_back(esumCond);
1316 
1317  if (m_isDebugEnabled) {
1318  LogTrace("L1GtTriggerMenuConfigOnlineProd")
1319  << "\n Adding condition " << (condDB.cond) << " on chip " << (*itChip) << "\n " << std::endl;
1320 
1321  LogTrace("L1GtTriggerMenuConfigOnlineProd") << esumCond << "\n" << std::endl;
1322  }
1323  }
1324 }
1325 
1327  L1GtCastorTemplate castorCond(condDB.cond);
1328  castorCond.setCondType(strToEnumCondType(condDB.condType));
1329 
1330  // object types - logical conditions have no objects associated in GT
1331  // one put however a "Castor" object type
1332  int nrObj = 1;
1333 
1335  std::vector<L1GtObject> objType(nrObj, obj);
1336  castorCond.setObjectType(objType);
1337 
1338  // irrelevant, set to false for completeness
1339  castorCond.setCondGEq(false);
1340 
1341  // logical conditions have no ObjectParameter, no CorrelationParameter
1342 
1343  // get chip number list
1344  std::list<int> chipList = listChipNumber(condDB.cond);
1345 
1346  // eliminate duplicates
1347  chipList.sort();
1348  chipList.unique();
1349 
1350  // add the same condition once to every chip where required
1351  for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1352  castorCond.setCondChipNr(*itChip);
1353 
1354  // no check for uniqueness - done by DB
1355  (m_vecCastorTemplate[*itChip]).push_back(castorCond);
1356 
1357  if (m_isDebugEnabled) {
1358  LogTrace("L1GtTriggerMenuConfigOnlineProd")
1359  << "\n Adding condition " << (condDB.cond) << " on chip " << (*itChip) << "\n " << std::endl;
1360 
1361  LogTrace("L1GtTriggerMenuConfigOnlineProd") << castorCond << "\n" << std::endl;
1362  }
1363  }
1364 }
1365 
1367  L1GtBptxTemplate bptxCond(condDB.cond);
1368  bptxCond.setCondType(strToEnumCondType(condDB.condType));
1369 
1370  // object types - logical conditions have no objects associated in GT
1371  // one put however a "Bptx" object type
1372  int nrObj = 1;
1373 
1375  std::vector<L1GtObject> objType(nrObj, obj);
1376  bptxCond.setObjectType(objType);
1377 
1378  // irrelevant, set to false for completeness
1379  bptxCond.setCondGEq(false);
1380 
1381  // logical conditions have no ObjectParameter, no CorrelationParameter
1382 
1383  // get chip number list
1384  std::list<int> chipList = listChipNumber(condDB.cond);
1385 
1386  // eliminate duplicates
1387  chipList.sort();
1388  chipList.unique();
1389 
1390  // add the same condition once to every chip where required
1391  for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1392  bptxCond.setCondChipNr(*itChip);
1393 
1394  // no check for uniqueness - done by DB
1395  (m_vecBptxTemplate[*itChip]).push_back(bptxCond);
1396 
1397  if (m_isDebugEnabled) {
1398  LogTrace("L1GtTriggerMenuConfigOnlineProd")
1399  << "\n Adding condition " << (condDB.cond) << " on chip " << (*itChip) << "\n " << std::endl;
1400 
1401  LogTrace("L1GtTriggerMenuConfigOnlineProd") << bptxCond << "\n" << std::endl;
1402  }
1403  }
1404 }
1405 
1407  L1GtExternalTemplate externalCond(condDB.cond);
1408  externalCond.setCondType(strToEnumCondType(condDB.condType));
1409 
1410  // object types - logical conditions have no objects associated in GT
1411  // one put however a "External" object type
1412  int nrObj = 1;
1413 
1415  std::vector<L1GtObject> objType(nrObj, obj);
1416  externalCond.setObjectType(objType);
1417 
1418  // irrelevant, set to false for completeness
1419  externalCond.setCondGEq(false);
1420 
1421  // logical conditions have no ObjectParameter, no CorrelationParameter
1422 
1423  // get chip number list
1424  std::list<int> chipList = listChipNumber(condDB.cond);
1425 
1426  // eliminate duplicates
1427  chipList.sort();
1428  chipList.unique();
1429 
1430  // add the same condition once to every chip where required
1431  for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1432  externalCond.setCondChipNr(*itChip);
1433 
1434  // no check for uniqueness - done by DB
1435  (m_vecExternalTemplate[*itChip]).push_back(externalCond);
1436 
1437  if (m_isDebugEnabled) {
1438  LogTrace("L1GtTriggerMenuConfigOnlineProd")
1439  << "\n Adding condition " << (condDB.cond) << " on chip " << (*itChip) << "\n " << std::endl;
1440 
1441  LogTrace("L1GtTriggerMenuConfigOnlineProd") << externalCond << "\n" << std::endl;
1442  }
1443  }
1444 }
1445 
1447  // create a new correlation condition
1448  L1GtCorrelationTemplate correlationCond(condDB.cond);
1449  correlationCond.setCondType(strToEnumCondType(condDB.condType));
1450 
1451  // two objects (for sure) - type taken from DB
1452  const int nrObj = 2;
1453 
1454  std::vector<L1GtObject> objType(nrObj);
1456  objType[0] = obj;
1457 
1458  obj = strToEnumL1GtObject(condDB.gtObject2);
1459  objType[1] = obj;
1460 
1461  correlationCond.setObjectType(objType);
1462 
1463  // irrelevant, it is set for each subcondition
1464  correlationCond.setCondGEq(condDB.condGEq);
1465 
1466  // get chip number list, eliminate duplicates
1467  std::list<int> chipList = listChipNumber(condDB.cond);
1468  chipList.sort();
1469  chipList.unique();
1470 
1471  // temporary vectors for sub-conditions
1472  std::vector<L1GtConditionCategory> subcondCategory(nrObj);
1473  std::vector<int> subcondIndex(nrObj);
1474 
1475  bool wrongSubcondition = false;
1476 
1477  for (int iObj = 0; iObj < nrObj; ++iObj) {
1478  L1GtObject gtObj = objType[iObj];
1479 
1480  // sub-conditions (all have the same condGEq as the correlation condition).
1481  switch (gtObj) {
1482  case Mu: {
1483  subcondCategory[iObj] = CondMuon;
1484 
1485  // temporary storage of the parameters
1486  std::vector<L1GtMuonTemplate::ObjectParameter> objParameter(1);
1487 
1488  std::string subcondName;
1489  if (iObj == 0) {
1490  fillMuonObjectParameter(condDB.objectParameter1FK, objParameter[0]);
1491  subcondName = condDB.objectParameter1FK;
1492  } else if (iObj == 1) {
1493  subcondName = condDB.objectParameter2FK;
1494  fillMuonObjectParameter(condDB.objectParameter2FK, objParameter[0]);
1495  }
1496 
1497  // chargeCorrelation must be set for muons
1498  // put it to ignore
1500  corrPar.chargeCorrelation = 1;
1501 
1502  L1GtMuonTemplate subcond(subcondName, Type1s);
1503  subcond.setCondGEq(condDB.condGEq);
1504  subcond.setObjectType(std::vector<L1GtObject>(1, gtObj));
1505  subcond.setConditionParameter(objParameter, corrPar);
1506 
1507  // add the same sub-condition once to every chip where required
1508  for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1509  subcond.setCondChipNr(*itChip);
1510 
1511  // no check for uniqueness - done by DB
1512  (m_corMuonTemplate[*itChip]).push_back(subcond);
1513 
1514  // index
1515  subcondIndex[iObj] = (m_corMuonTemplate[*itChip]).size() - 1;
1516 
1517  if (m_isDebugEnabled) {
1518  LogTrace("L1GtTriggerMenuConfigOnlineProd")
1519  << "\n Adding condition " << (condDB.cond) << " on chip " << (*itChip) << "\n " << std::endl;
1520 
1521  LogTrace("L1GtTriggerMenuConfigOnlineProd") << subcond << "\n" << std::endl;
1522  }
1523  }
1524 
1525  } break;
1526 
1527  case IsoEG:
1528  case NoIsoEG:
1529  case CenJet:
1530  case ForJet:
1531  case TauJet: {
1532  subcondCategory[iObj] = CondCalo;
1533 
1534  // temporary storage of the parameters
1535  std::vector<L1GtCaloTemplate::ObjectParameter> objParameter(1);
1536 
1537  std::string subcondName;
1538  if (iObj == 0) {
1539  fillCaloObjectParameter(condDB.objectParameter1FK, objParameter[0]);
1540  subcondName = condDB.objectParameter1FK;
1541  } else if (iObj == 1) {
1542  subcondName = condDB.objectParameter2FK;
1543  fillCaloObjectParameter(condDB.objectParameter2FK, objParameter[0]);
1544  }
1545 
1546  L1GtCaloTemplate::CorrelationParameter corrPar; // dummy
1547 
1548  L1GtCaloTemplate subcond(subcondName, Type1s);
1549  subcond.setCondGEq(condDB.condGEq);
1550  subcond.setObjectType(std::vector<L1GtObject>(1, gtObj));
1551  subcond.setConditionParameter(objParameter, corrPar);
1552 
1553  // add the same sub-condition once to every chip where required
1554  for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1555  subcond.setCondChipNr(*itChip);
1556 
1557  // no check for uniqueness - done by DB
1558  (m_corCaloTemplate[*itChip]).push_back(subcond);
1559 
1560  // index
1561  subcondIndex[iObj] = (m_corCaloTemplate[*itChip]).size() - 1;
1562 
1563  if (m_isDebugEnabled) {
1564  LogTrace("L1GtTriggerMenuConfigOnlineProd")
1565  << "\n Adding condition " << (condDB.cond) << " on chip " << (*itChip) << "\n " << std::endl;
1566 
1567  LogTrace("L1GtTriggerMenuConfigOnlineProd") << subcond << "\n" << std::endl;
1568  }
1569  }
1570  } break;
1571 
1572  case ETM:
1573  case HTM: {
1574  subcondCategory[iObj] = CondEnergySum;
1575 
1576  // temporary storage of the parameters
1577  std::vector<L1GtEnergySumTemplate::ObjectParameter> objParameter(1);
1578 
1579  std::string subcondName;
1580  if (iObj == 0) {
1581  fillEnergySumObjectParameter(condDB.objectParameter1FK, objParameter[0], gtObj);
1582  subcondName = condDB.objectParameter1FK;
1583  } else if (iObj == 1) {
1584  subcondName = condDB.objectParameter2FK;
1585  fillEnergySumObjectParameter(condDB.objectParameter2FK, objParameter[0], gtObj);
1586  }
1587 
1588  L1GtConditionType condType;
1589 
1590  switch (gtObj) {
1591  case ETM: {
1592  condType = TypeETM;
1593  } break;
1594  case HTM: {
1595  condType = TypeHTM;
1596  } break;
1597  default: {
1598  edm::LogWarning("L1GtTriggerMenuConfigOnlineProd")
1599  << "\n Warning: wrong L1GtConditionType " << gtObj << std::endl;
1600 
1601  } break;
1602  }
1603 
1604  L1GtEnergySumTemplate subcond(subcondName, condType);
1605  subcond.setCondGEq(condDB.condGEq);
1606  subcond.setObjectType(std::vector<L1GtObject>(1, gtObj));
1607  subcond.setConditionParameter(objParameter);
1608 
1609  // add the same sub-condition once to every chip where required
1610  for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1611  subcond.setCondChipNr(*itChip);
1612 
1613  // no check for uniqueness - done by DB
1614  (m_corEnergySumTemplate[*itChip]).push_back(subcond);
1615 
1616  // index
1617  subcondIndex[iObj] = (m_corEnergySumTemplate[*itChip]).size() - 1;
1618 
1619  if (m_isDebugEnabled) {
1620  LogTrace("L1GtTriggerMenuConfigOnlineProd")
1621  << "\n Adding condition " << (condDB.cond) << " on chip " << (*itChip) << "\n " << std::endl;
1622 
1623  LogTrace("L1GtTriggerMenuConfigOnlineProd") << subcond << "\n" << std::endl;
1624  }
1625  }
1626  } break;
1627  case ETT:
1628  case HTT:
1629  case JetCounts:
1630  case HfBitCounts:
1631  case HfRingEtSums:
1632  case Castor:
1633  case BPTX:
1634  case GtExternal:
1635  case TechTrig: {
1636  wrongSubcondition = true;
1637  edm::LogWarning("L1GtTriggerMenuConfigOnlineProd")
1638  << "\n Warning: correlation condition " << (condDB.cond) << " with invalid sub-condition object type "
1639  << gtObj << "\n Condition ignored!" << std::endl;
1640  }
1641  [[fallthrough]];
1642  default: {
1643  wrongSubcondition = true;
1644  edm::LogWarning("L1GtTriggerMenuConfigOnlineProd")
1645  << "\n Warning: correlation condition " << (condDB.cond) << " with invalid sub-condition object type "
1646  << gtObj << "\n Condition ignored!" << std::endl;
1647 
1648  //
1649 
1650  } break;
1651  }
1652  }
1653 
1654  if (wrongSubcondition) {
1655  edm::LogWarning("L1GtTriggerMenuConfigOnlineProd")
1656  << "\n Warning: wrong sub-condition for correlation condition " << (condDB.cond)
1657  << "\n Condition not inserted in menu. \n A sub-condition may be left in the menu" << std::endl;
1658  return;
1659  }
1660 
1661  // get the correlation parameters for the correlation condition (std::string)
1663  corrParameter.deltaEtaRange = condDB.deltaEtaRange;
1664  corrParameter.deltaPhiRange = condDB.deltaPhiRange;
1665 
1666  // set condition categories
1667  correlationCond.setCond0Category(subcondCategory[0]);
1668  correlationCond.setCond1Category(subcondCategory[1]);
1669 
1670  // set condition indices in correlation vector
1671  correlationCond.setCond0Index(subcondIndex[0]);
1672  correlationCond.setCond1Index(subcondIndex[1]);
1673 
1674  // set correlation parameter
1675  corrParameter.deltaPhiMaxbits = 0; // TODO
1676  correlationCond.setCorrelationParameter(corrParameter);
1677 
1678  // add the same condition once to every chip where required
1679  for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1680  correlationCond.setCondChipNr(*itChip);
1681 
1682  // no check for uniqueness - done by DB
1683  (m_vecCorrelationTemplate[*itChip]).push_back(correlationCond);
1684 
1685  if (m_isDebugEnabled) {
1686  LogTrace("L1GtTriggerMenuConfigOnlineProd")
1687  << "\n Adding condition " << (condDB.cond) << " on chip " << (*itChip) << "\n " << std::endl;
1688 
1689  LogTrace("L1GtTriggerMenuConfigOnlineProd") << correlationCond << "\n" << std::endl;
1690  }
1691  }
1692 }
1693 
1694 // add the conditions from a menu to the corresponding list
1696  // loop over m_tableMenuCond
1697  for (std::vector<TableMenuCond>::const_iterator constIt = m_tableMenuCond.begin(); constIt != m_tableMenuCond.end();
1698  constIt++) {
1699  L1GtConditionCategory conCategory = strToEnumCondCategory((*constIt).condCategory);
1700 
1701  switch (conCategory) {
1702  case CondMuon: {
1703  addMuonCondition(*constIt);
1704 
1705  } break;
1706  case CondCalo: {
1707  addCaloCondition(*constIt);
1708 
1709  } break;
1710  case CondEnergySum: {
1711  addEnergySumCondition(*constIt);
1712 
1713  } break;
1714  case CondJetCounts: {
1715  addJetCountsCondition(*constIt);
1716 
1717  } break;
1718  case CondHfBitCounts: {
1719  addHfBitCountsCondition(*constIt);
1720 
1721  } break;
1722  case CondHfRingEtSums: {
1723  addHfRingEtSumsCondition(*constIt);
1724 
1725  } break;
1726  case CondCastor: {
1727  addCastorCondition(*constIt);
1728 
1729  } break;
1730  case CondBptx: {
1731  addBptxCondition(*constIt);
1732 
1733  } break;
1734  case CondExternal: {
1735  addExternalCondition(*constIt);
1736 
1737  } break;
1738  case CondCorrelation: {
1739  addCorrelationCondition(*constIt);
1740 
1741  } break;
1742  case CondNull: {
1743  // do nothing
1744 
1745  } break;
1746  default: {
1747  // do nothing
1748 
1749  } break;
1750  }
1751  }
1752 }
1753 
l1t::OMDSReader::QueryResults
Definition: OMDSReader.h:49
L1GtTriggerMenuConfigOnlineProd::TableMenuObjectParameters::ptHighThreshold
short ptHighThreshold
Definition: L1GtTriggerMenuConfigOnlineProd.h:109
L1GtTriggerMenuConfigOnlineProd::m_tableMenuTechTrig
std::vector< TableMenuTechTrig > m_tableMenuTechTrig
Definition: L1GtTriggerMenuConfigOnlineProd.h:215
L1GtTriggerMenuConfigOnlineProd::TableMenuCond::objectParameter2FK
std::string objectParameter2FK
Definition: L1GtTriggerMenuConfigOnlineProd.h:100
L1GtTriggerMenuConfigOnlineProd::addBptxCondition
void addBptxCondition(const TableMenuCond &)
Definition: L1GtTriggerMenuConfigOnlineProd.cc:1366
HIPAlignmentAlgorithm_cfi.verbosity
verbosity
Definition: HIPAlignmentAlgorithm_cfi.py:7
L1GtTriggerMenuConfigOnlineProd::init
void init(const int numberConditionChips)
initialize the class (mainly reserve/resize)
Definition: L1GtTriggerMenuConfigOnlineProd.cc:53
L1GtLogicParser::convertIntToNameLogicalExpression
void convertIntToNameLogicalExpression(const std::map< int, std::string > &intToNameMap)
Definition: L1GtLogicParser.cc:961
L1GtTriggerMenu.h
L1GtTriggerMenuConfigOnlineProd::condIndexNameMap
const std::map< int, std::string > condIndexNameMap(const short bitNr) const
Definition: L1GtTriggerMenuConfigOnlineProd.cc:664
L1GtTriggerMenuConfigOnlineProd::fillCaloObjectParameter
void fillCaloObjectParameter(const std::string &opFK, L1GtCaloTemplate::ObjectParameter &)
Definition: L1GtTriggerMenuConfigOnlineProd.cc:1039
HTM
Definition: L1GtObject.h:38
L1GtTriggerMenuConfigOnlineProd::addExternalCondition
void addExternalCondition(const TableMenuCond &)
Definition: L1GtTriggerMenuConfigOnlineProd.cc:1406
L1GtTriggerMenuConfigOnlineProd::tableMenuAlgoCondFromDB
bool tableMenuAlgoCondFromDB(const std::string &gtSchema, const std::string &objKey)
retrieve table with conditions associated to physics algorithms from DB
Definition: L1GtTriggerMenuConfigOnlineProd.cc:308
L1GtTriggerMenuConfigOnlineProd::strToEnumCondType
L1GtConditionType strToEnumCondType(const std::string &strType)
string to enum L1GtConditionType conversion
Definition: L1GtTriggerMenuConfigOnlineProd.cc:807
L1GtTriggerMenuConfigOnlineProd::listChipNumber
std::list< int > listChipNumber(const std::string &)
get a list of chip numbers from the m_tableMenuAlgoCond table for a condition
Definition: L1GtTriggerMenuConfigOnlineProd.cc:928
L1GtAlgorithm.h
GtExternal
Definition: L1GtObject.h:45
L1GtTriggerMenuConfigOnlineProd::TableMenuObjectParameters::opId
std::string opId
Definition: L1GtTriggerMenuConfigOnlineProd.h:108
L1GtTriggerMenuConfigOnlineProd::m_algorithmAliasMap
AlgorithmMap m_algorithmAliasMap
map containing the physics algorithms (by alias)
Definition: L1GtTriggerMenuConfigOnlineProd.h:249
CondBptx
Definition: L1GtDefinitions.h:36
MessageLogger.h
L1GtTriggerMenuConfigOnlineProd::m_vecHfBitCountsTemplate
std::vector< std::vector< L1GtHfBitCountsTemplate > > m_vecHfBitCountsTemplate
Definition: L1GtTriggerMenuConfigOnlineProd.h:235
L1GtMuonTemplate::CorrelationParameter::deltaPhiRange1Word
unsigned long long deltaPhiRange1Word
Definition: L1GtMuonTemplate.h:78
L1GtTriggerMenuConfigOnlineProd::TableMenuObjectParameters::ptLowThreshold
short ptLowThreshold
Definition: L1GtTriggerMenuConfigOnlineProd.h:110
TypeCastor
Definition: L1GtDefinitions.h:17
L1GtCondition::nrObjects
const int nrObjects() const
get number of trigger objects
Definition: L1GtCondition.cc:62
L1GtEnergySumTemplate
Definition: L1GtEnergySumTemplate.h:34
L1GtCorrelationTemplate::setCond1Category
void setCond1Category(const L1GtConditionCategory &)
Definition: L1GtCorrelationTemplate.cc:119
L1GtTriggerMenuConfigOnlineProd::TableMenuAlgoCond
Definition: L1GtTriggerMenuConfigOnlineProd.h:79
TypeJetCounts
Definition: L1GtDefinitions.h:16
ETM
Definition: L1GtObject.h:35
TypeBptx
Definition: L1GtDefinitions.h:20
Castor
Definition: L1GtObject.h:43
L1GtHfRingEtSumsTemplate
Definition: L1GtHfRingEtSumsTemplate.h:34
L1GtAlgorithm::setAlgoAlias
void setAlgoAlias(const std::string &algoAliasValue)
Definition: L1GtAlgorithm.h:59
TypeETM
Definition: L1GtDefinitions.h:12
L1GtCondition::setObjectType
void setObjectType(const std::vector< L1GtObject > &objType)
Definition: L1GtCondition.h:69
L1GtTriggerMenuConfigOnlineProd::m_vecBptxTemplate
std::vector< std::vector< L1GtBptxTemplate > > m_vecBptxTemplate
Definition: L1GtTriggerMenuConfigOnlineProd.h:237
L1GtTriggerMenuConfigOnlineProd
Definition: L1GtTriggerMenuConfigOnlineProd.h:48
L1ConfigOnlineProdBase< L1GtTriggerMenuRcd, L1GtTriggerMenu >::m_omdsReader
l1t::OMDSReader m_omdsReader
Definition: L1ConfigOnlineProdBase.h:65
L1GtCorrelationTemplate::CorrelationParameter::deltaEtaRange
std::string deltaEtaRange
Definition: L1GtCorrelationTemplate.h:64
L1GtTriggerMenuConfigOnlineProd::m_vecCorrelationTemplate
std::vector< std::vector< L1GtCorrelationTemplate > > m_vecCorrelationTemplate
Definition: L1GtTriggerMenuConfigOnlineProd.h:240
L1GtTriggerMenuConfigOnlineProd::TableMenuGeneral::scalesKey
std::string scalesKey
Definition: L1GtTriggerMenuConfigOnlineProd.h:69
L1GtMuonTemplate::ObjectParameter
Definition: L1GtMuonTemplate.h:56
L1GtCondition::setCondType
void setCondType(const L1GtConditionType &cType)
Definition: L1GtCondition.h:64
L1GtTriggerMenuConfigOnlineProd::strToEnumL1GtObject
L1GtObject strToEnumL1GtObject(const std::string &strObject)
string to enum L1GtObject conversion
Definition: L1GtTriggerMenuConfigOnlineProd.cc:851
edm
HLT enums.
Definition: AlignableModifier.h:19
L1GtTriggerMenuConfigOnlineProd::TableMenuAlgo
Definition: L1GtTriggerMenuConfigOnlineProd.h:72
L1GtTriggerMenuConfigOnlineProd::TableMenuObjectParameters::qualityRange
std::string qualityRange
Definition: L1GtTriggerMenuConfigOnlineProd.h:120
L1GtTriggerMenuConfigOnlineProd::newObject
std::unique_ptr< L1GtTriggerMenu > newObject(const std::string &objectKey) override
public methods
Definition: L1GtTriggerMenuConfigOnlineProd.cc:73
CondMuon
Definition: L1GtDefinitions.h:28
L1GtTriggerMenuConfigOnlineProd::TableMenuGeneral::algoImplTag
std::string algoImplTag
Definition: L1GtTriggerMenuConfigOnlineProd.h:68
L1GtTriggerMenuConfigOnlineProd::strToEnumCondCategory
L1GtConditionCategory strToEnumCondCategory(const std::string &strCategory)
string to enum L1GtConditionCategory conversion
Definition: L1GtTriggerMenuConfigOnlineProd.cc:773
L1GtTriggerMenuConfigOnlineProd::tableMenuObjectParametersFromDB
bool tableMenuObjectParametersFromDB(const std::string &gtSchema, const std::string &objKey)
retrieve table with object parameters from DB
Definition: L1GtTriggerMenuConfigOnlineProd.cc:492
L1GtTriggerMenuConfigOnlineProd::TableMenuAlgoCond::condFK
std::string condFK
Definition: L1GtTriggerMenuConfigOnlineProd.h:82
L1GtTriggerMenuConfigOnlineProd::TableMenuCond::gtObject1
std::string gtObject1
Definition: L1GtTriggerMenuConfigOnlineProd.h:89
L1GtCondition::wsc
const bool wsc() const
Definition: L1GtCondition.cc:114
L1GtCaloTemplate::ObjectParameter
typedef for a single object template
Definition: L1GtCaloTemplate.h:56
L1GtTriggerMenuConfigOnlineProd::m_tableMenuAlgo
std::vector< TableMenuAlgo > m_tableMenuAlgo
Definition: L1GtTriggerMenuConfigOnlineProd.h:211
L1GtTriggerMenuConfigOnlineProd::m_vecJetCountsTemplate
std::vector< std::vector< L1GtJetCountsTemplate > > m_vecJetCountsTemplate
Definition: L1GtTriggerMenuConfigOnlineProd.h:233
bookConverter.results
results
Definition: bookConverter.py:144
L1GtTriggerMenuConfigOnlineProd::TableMenuObjectParameters::etaRange
std::string etaRange
Definition: L1GtTriggerMenuConfigOnlineProd.h:116
L1GtTriggerMenuConfigOnlineProd::m_corMuonTemplate
std::vector< std::vector< L1GtMuonTemplate > > m_corMuonTemplate
Definition: L1GtTriggerMenuConfigOnlineProd.h:241
L1GtBptxTemplate
Definition: L1GtBptxTemplate.h:39
NoIsoEG
Definition: L1GtObject.h:30
L1GtCorrelationTemplate::CorrelationParameter
typedef for correlation parameters
Definition: L1GtCorrelationTemplate.h:63
CondEnergySum
Definition: L1GtDefinitions.h:30
L1GtTriggerMenuConfigOnlineProd::L1GtTriggerMenuConfigOnlineProd
L1GtTriggerMenuConfigOnlineProd(const edm::ParameterSet &)
constructor
Definition: L1GtTriggerMenuConfigOnlineProd.cc:40
l1t::OMDSReader::singleAttribute
const QueryResults singleAttribute(const T &data) const
Definition: OMDSReader.h:259
L1GtTriggerMenuConfigOnlineProd::TableMenuObjectParameters
Definition: L1GtTriggerMenuConfigOnlineProd.h:107
L1ConfigOnlineProdBase
Definition: L1ConfigOnlineProdBase.h:52
L1GtTriggerMenuConfigOnlineProd::addHfBitCountsCondition
void addHfBitCountsCondition(const TableMenuCond &)
Definition: L1GtTriggerMenuConfigOnlineProd.cc:1238
L1GtMuonTemplate::CorrelationParameter::deltaPhiMaxbits
unsigned int deltaPhiMaxbits
Definition: L1GtMuonTemplate.h:79
L1GtCorrelationTemplate::setCond0Index
void setCond0Index(const int &)
Definition: L1GtCorrelationTemplate.cc:122
CondJetCounts
Definition: L1GtDefinitions.h:31
IsoEG
Definition: L1GtObject.h:31
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
L1GtMuonTemplate::ObjectParameter::etaRange
unsigned long long etaRange
Definition: L1GtMuonTemplate.h:63
L1GtTriggerMenuConfigOnlineProd::TableMenuObjectParameters::requestIso
bool requestIso
Definition: L1GtTriggerMenuConfigOnlineProd.h:113
L1GtTriggerMenuConfigOnlineProd::TableMenuCond::countIndex
short countIndex
Definition: L1GtTriggerMenuConfigOnlineProd.h:92
L1GtTriggerMenuConfigOnlineProd::addJetCountsCondition
void addJetCountsCondition(const TableMenuCond &)
Definition: L1GtTriggerMenuConfigOnlineProd.cc:1193
L1GtTriggerMenuConfigOnlineProd::fillEnergySumObjectParameter
void fillEnergySumObjectParameter(const std::string &opFK, L1GtEnergySumTemplate::ObjectParameter &, const L1GtObject &)
Definition: L1GtTriggerMenuConfigOnlineProd.cc:1122
L1GtEnergySumTemplate::setConditionParameter
void setConditionParameter(const std::vector< ObjectParameter > &)
set functions
Definition: L1GtEnergySumTemplate.cc:71
L1GtTriggerMenuConfigOnlineProd::m_isDebugEnabled
bool m_isDebugEnabled
Definition: L1GtTriggerMenuConfigOnlineProd.h:255
TypeHfBitCounts
Definition: L1GtDefinitions.h:18
L1GtConditionCategory
L1GtConditionCategory
condition categories
Definition: L1GtDefinitions.h:26
L1GtMuonTemplate::CorrelationParameter
Definition: L1GtMuonTemplate.h:73
TypeETT
Definition: L1GtDefinitions.h:13
CondNull
Definition: L1GtDefinitions.h:27
L1GtCorrelationTemplate::setCond0Category
void setCond0Category(const L1GtConditionCategory &)
Definition: L1GtCorrelationTemplate.cc:117
L1GtCorrelationTemplate::CorrelationParameter::deltaPhiMaxbits
unsigned int deltaPhiMaxbits
Definition: L1GtCorrelationTemplate.h:67
L1GtCaloTemplate::CorrelationParameter::deltaPhiRange
unsigned long long deltaPhiRange
Definition: L1GtCaloTemplate.h:68
L1GtTriggerMenuConfigOnlineProd::TableMenuTechTrig::bitNumberSh
short bitNumberSh
Definition: L1GtTriggerMenuConfigOnlineProd.h:125
l1t::OMDSReader::QueryResults::fillVariableFromRow
bool fillVariableFromRow(const std::string &columnName, int rowNumber, T &outputVariable) const
Definition: OMDSReader.h:279
L1GtTriggerMenuConfigOnlineProd::addHfRingEtSumsCondition
void addHfRingEtSumsCondition(const TableMenuCond &)
Definition: L1GtTriggerMenuConfigOnlineProd.cc:1282
L1GtCorrelationTemplate::CorrelationParameter::deltaPhiRange
std::string deltaPhiRange
Definition: L1GtCorrelationTemplate.h:66
TypeHTM
Definition: L1GtDefinitions.h:15
L1GtCorrelationTemplate
Definition: L1GtCorrelationTemplate.h:37
L1GtMuonTemplate::ObjectParameter::enableIso
bool enableIso
Definition: L1GtMuonTemplate.h:60
L1GtEnergySumTemplate::ObjectParameter::energyOverflow
bool energyOverflow
Definition: L1GtEnergySumTemplate.h:58
L1GtTriggerMenuConfigOnlineProd::tableMenuGeneralFromDB
bool tableMenuGeneralFromDB(const std::string &gtSchema, const std::string &objKey)
methods to retrieve the tables from DB
Definition: L1GtTriggerMenuConfigOnlineProd.cc:177
L1GtTriggerMenuConfigOnlineProd::TableMenuTechTrig
Definition: L1GtTriggerMenuConfigOnlineProd.h:124
L1GtTriggerMenuConfigOnlineProd::TableMenuAlgo::bitNumberSh
short bitNumberSh
Definition: L1GtTriggerMenuConfigOnlineProd.h:73
HTT
Definition: L1GtObject.h:37
L1GtTriggerMenuConfigOnlineProd::addCorrelationCondition
void addCorrelationCondition(const TableMenuCond &)
Definition: L1GtTriggerMenuConfigOnlineProd.cc:1446
HfBitCounts
Definition: L1GtObject.h:40
L1GtEnergySumTemplate::ObjectParameter::phiRange0Word
unsigned long long phiRange0Word
Definition: L1GtEnergySumTemplate.h:62
L1GtTriggerMenuRcd
Definition: L1GtTriggerMenuRcd.h:32
HfRingEtSums
Definition: L1GtObject.h:41
L1GtMuonTemplate::ObjectParameter::qualityRange
unsigned int qualityRange
Definition: L1GtMuonTemplate.h:62
L1GtTriggerMenuConfigOnlineProd::TableMenuTechTrig::techName
std::string techName
Definition: L1GtTriggerMenuConfigOnlineProd.h:126
L1GtMuonTemplate::ObjectParameter::phiLow
unsigned int phiLow
Definition: L1GtMuonTemplate.h:65
L1GtTriggerMenuConfigOnlineProd::TableMenuAlgoCond::bitNumberSh
short bitNumberSh
Definition: L1GtTriggerMenuConfigOnlineProd.h:80
CenJet
Definition: L1GtObject.h:32
CondExternal
Definition: L1GtDefinitions.h:37
L1GtCorrelationTemplate::setCorrelationParameter
void setCorrelationParameter(const CorrelationParameter &corrParameter)
Definition: L1GtCorrelationTemplate.cc:127
L1GtCaloTemplate::CorrelationParameter
typedef for correlation parameters
Definition: L1GtCaloTemplate.h:65
L1GtHfRingEtSumsTemplate::setConditionParameter
void setConditionParameter(const std::vector< ObjectParameter > &)
set functions
Definition: L1GtHfRingEtSumsTemplate.cc:73
TypeExternal
Definition: L1GtDefinitions.h:21
L1GtCaloTemplate::CorrelationParameter::deltaEtaRange
unsigned long long deltaEtaRange
Definition: L1GtCaloTemplate.h:66
L1GtCondition::setCondChipNr
void setCondChipNr(const int &cChipNr)
Definition: L1GtCondition.h:79
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
L1GtTriggerMenuConfigOnlineProd::m_vecHfRingEtSumsTemplate
std::vector< std::vector< L1GtHfRingEtSumsTemplate > > m_vecHfRingEtSumsTemplate
Definition: L1GtTriggerMenuConfigOnlineProd.h:236
TechTrig
Definition: L1GtObject.h:42
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1GtTriggerMenuConfigOnlineProd::fillMuonObjectParameter
void fillMuonObjectParameter(const std::string &opFK, L1GtMuonTemplate::ObjectParameter &)
Definition: L1GtTriggerMenuConfigOnlineProd.cc:944
L1GtCaloTemplate::setConditionParameter
void setConditionParameter(const std::vector< ObjectParameter > &objParameter, const CorrelationParameter &corrParameter)
set functions
Definition: L1GtCaloTemplate.cc:65
L1GtEnergySumTemplate::ObjectParameter
typedef for a single object template
Definition: L1GtEnergySumTemplate.h:56
L1GtCaloTemplate::CorrelationParameter::deltaPhiMaxbits
unsigned int deltaPhiMaxbits
Definition: L1GtCaloTemplate.h:69
L1GtConditionType
L1GtConditionType
Definition: L1GtDefinitions.h:4
L1GtLogicParser::logicalExpression
std::string logicalExpression() const
return the logical expression
Definition: L1GtLogicParser.h:88
L1GtTriggerMenuConfigOnlineProd::TableMenuObjectParameters::phiLow
short phiLow
Definition: L1GtTriggerMenuConfigOnlineProd.h:119
L1GtTriggerMenuConfigOnlineProd::splitHexStringInTwo64bitWords
void splitHexStringInTwo64bitWords(const std::string &hexStr, std::string &hex0WordStr, std::string &hex1WordStr)
split a hex string in two 64-bit words returned as hex strings
Definition: L1GtTriggerMenuConfigOnlineProd.cc:897
L1GtHfBitCountsTemplate
Definition: L1GtHfBitCountsTemplate.h:34
L1GtTriggerMenuConfigOnlineProd::TableMenuCond::condCategory
std::string condCategory
Definition: L1GtTriggerMenuConfigOnlineProd.h:87
TauJet
Definition: L1GtObject.h:34
electrons_cff.objType
objType
Definition: electrons_cff.py:514
edm::ParameterSet
Definition: ParameterSet.h:47
Type2wsc
Definition: L1GtDefinitions.h:8
TypeHfRingEtSums
Definition: L1GtDefinitions.h:19
L1GtTriggerMenu
Definition: L1GtTriggerMenu.h:48
L1GtCondition.h
L1GtTriggerMenuConfigOnlineProd::TableMenuObjectParameters::enableMip
bool enableMip
Definition: L1GtTriggerMenuConfigOnlineProd.h:111
CondCastor
Definition: L1GtDefinitions.h:33
L1GtTriggerMenuConfigOnlineProd::tableMenuTechTrigFromDB
bool tableMenuTechTrigFromDB(const std::string &gtSchema, const std::string &objKey)
retrieve table with technical triggers from DB
Definition: L1GtTriggerMenuConfigOnlineProd.cc:598
L1GtAlgorithm
Definition: L1GtAlgorithm.h:32
L1GtTriggerMenuConfigOnlineProd::TableMenuCond::objectParameter1FK
std::string objectParameter1FK
Definition: L1GtTriggerMenuConfigOnlineProd.h:99
L1GtTriggerMenuConfigOnlineProd::m_technicalTriggerMap
AlgorithmMap m_technicalTriggerMap
map containing the technical triggers
Definition: L1GtTriggerMenuConfigOnlineProd.h:252
L1GtTriggerMenuConfigOnlineProd::TableMenuGeneral::menuInterface
std::string menuInterface
Definition: L1GtTriggerMenuConfigOnlineProd.h:66
L1GtCorrelationTemplate::setCond1Index
void setCond1Index(const int &)
Definition: L1GtCorrelationTemplate.cc:124
L1GtTriggerMenuConfigOnlineProd::TableMenuCond::deltaEtaRange
std::string deltaEtaRange
Definition: L1GtTriggerMenuConfigOnlineProd.h:103
L1GtCaloTemplate::ObjectParameter::phiRange
unsigned int phiRange
Definition: L1GtCaloTemplate.h:59
L1GtTriggerMenuConfigOnlineProd::TableMenuCond::objectParameter4FK
std::string objectParameter4FK
Definition: L1GtTriggerMenuConfigOnlineProd.h:102
L1GtMuonTemplate::ObjectParameter::requestIso
bool requestIso
Definition: L1GtMuonTemplate.h:61
L1GtCaloTemplate
Definition: L1GtCaloTemplate.h:34
L1GtEnergySumTemplate::ObjectParameter::phiRange1Word
unsigned long long phiRange1Word
Definition: L1GtEnergySumTemplate.h:63
Type3s
Definition: L1GtDefinitions.h:10
L1GtTriggerMenuConfigOnlineProd::TableMenuAlgo::algName
std::string algName
Definition: L1GtTriggerMenuConfigOnlineProd.h:74
L1GtTriggerMenuConfigOnlineProd::m_vecEnergySumTemplate
std::vector< std::vector< L1GtEnergySumTemplate > > m_vecEnergySumTemplate
Definition: L1GtTriggerMenuConfigOnlineProd.h:232
L1GtHfBitCountsTemplate::setConditionParameter
void setConditionParameter(const std::vector< ObjectParameter > &)
set functions
Definition: L1GtHfBitCountsTemplate.cc:73
L1GtFwd.h
L1GtTriggerMenuConfigOnlineProd::m_tableMenuCond
std::vector< TableMenuCond > m_tableMenuCond
Definition: L1GtTriggerMenuConfigOnlineProd.h:213
l1t::OMDSReader::QueryResults::numberRows
int numberRows() const
Definition: OMDSReader.h:60
CondCalo
Definition: L1GtDefinitions.h:29
L1GtExternalTemplate
Definition: L1GtExternalTemplate.h:39
L1GtMuonTemplate::CorrelationParameter::deltaPhiRange0Word
unsigned long long deltaPhiRange0Word
Definition: L1GtMuonTemplate.h:77
ETT
Definition: L1GtObject.h:36
L1GtJetCountsTemplate::setConditionParameter
void setConditionParameter(const std::vector< ObjectParameter > &)
set functions
Definition: L1GtJetCountsTemplate.cc:73
L1GtTriggerMenuConfigOnlineProd::TableMenuObjectParameters::energyOverflow
bool energyOverflow
Definition: L1GtTriggerMenuConfigOnlineProd.h:114
L1GtTriggerMenuConfigOnlineProd::tableMenuCondFromDB
bool tableMenuCondFromDB(const std::string &gtSchema, const std::string &objKey)
retrieve table with list of conditions in the menu
Definition: L1GtTriggerMenuConfigOnlineProd.cc:380
L1GtTriggerMenuConfigOnlineProd::m_tableMenuObjectParameters
std::vector< TableMenuObjectParameters > m_tableMenuObjectParameters
Definition: L1GtTriggerMenuConfigOnlineProd.h:214
L1GtMuonTemplate::ObjectParameter::ptLowThreshold
unsigned int ptLowThreshold
Definition: L1GtMuonTemplate.h:58
L1GtTriggerMenuConfigOnlineProd::m_algorithmMap
AlgorithmMap m_algorithmMap
map containing the physics algorithms (by name)
Definition: L1GtTriggerMenuConfigOnlineProd.h:246
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
L1GtTriggerMenuConfigOnlineProd::TableMenuObjectParameters::etThreshold
float etThreshold
Definition: L1GtTriggerMenuConfigOnlineProd.h:115
L1GtMuonTemplate::ObjectParameter::phiHigh
unsigned int phiHigh
Definition: L1GtMuonTemplate.h:64
CondHfBitCounts
Definition: L1GtDefinitions.h:34
L1GtTriggerMenuConfigOnlineProd::chipNumber
int chipNumber(short) const
return the chip number for an algorithm with index bitNumberSh
Definition: L1GtTriggerMenuConfigOnlineProd.cc:701
L1GtTriggerMenuConfigOnlineProd::TableMenuAlgoCond::condIndexF
float condIndexF
Definition: L1GtTriggerMenuConfigOnlineProd.h:81
L1GtMuonTemplate::CorrelationParameter::chargeCorrelation
unsigned int chargeCorrelation
Definition: L1GtMuonTemplate.h:74
L1GtTriggerMenuConfigOnlineProd::TableMenuCond::condGEq
bool condGEq
Definition: L1GtTriggerMenuConfigOnlineProd.h:91
l1t::OMDSReader::columnNamesView
std::vector< std::string > columnNamesView(const std::string &schemaName, const std::string &viewName)
Definition: OMDSReader.cc:234
Mu
Definition: L1GtObject.h:29
L1GtTriggerMenuConfigOnlineProd::TableMenuObjectParameters::phiHigh
short phiHigh
Definition: L1GtTriggerMenuConfigOnlineProd.h:118
L1GtTriggerMenuConfigOnlineProd::TableMenuCond::cond
std::string cond
Definition: L1GtTriggerMenuConfigOnlineProd.h:86
Type2cor
Definition: L1GtDefinitions.h:9
Type1s
Definition: L1GtDefinitions.h:6
L1GtTriggerMenuConfigOnlineProd::TableMenuObjectParameters::charge
bool charge
Definition: L1GtTriggerMenuConfigOnlineProd.h:121
L1GtCondition::setCondGEq
void setCondGEq(const bool &cGEq)
Definition: L1GtCondition.h:74
L1GtLogicParser
Definition: L1GtLogicParser.h:31
L1GtTriggerMenuConfigOnlineProd::m_vecMuonTemplate
std::vector< std::vector< L1GtMuonTemplate > > m_vecMuonTemplate
Definition: L1GtTriggerMenuConfigOnlineProd.h:230
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
L1GtMuonTemplate::CorrelationParameter::deltaEtaRange
unsigned long long deltaEtaRange
Definition: L1GtMuonTemplate.h:75
L1GtTriggerMenuConfigOnlineProd::TableMenuObjectParameters::phiRange
std::string phiRange
Definition: L1GtTriggerMenuConfigOnlineProd.h:117
L1GtTriggerMenuConfigOnlineProd::addEnergySumCondition
void addEnergySumCondition(const TableMenuCond &)
Definition: L1GtTriggerMenuConfigOnlineProd.cc:1151
mps_check.columns
columns
Definition: mps_check.py:244
L1GtTriggerMenuConfigOnlineProd::TableMenuAlgo::logExpression
std::string logExpression
Definition: L1GtTriggerMenuConfigOnlineProd.h:76
L1GtTriggerMenuConfigOnlineProd::TableMenuGeneral::menuImplementation
std::string menuImplementation
Definition: L1GtTriggerMenuConfigOnlineProd.h:67
L1GtTriggerMenuConfigOnlineProd::addConditions
void addConditions()
add the conditions from a menu to the corresponding list
Definition: L1GtTriggerMenuConfigOnlineProd.cc:1695
Type2s
Definition: L1GtDefinitions.h:7
L1GtTriggerMenuConfigOnlineProd::m_vecExternalTemplate
std::vector< std::vector< L1GtExternalTemplate > > m_vecExternalTemplate
Definition: L1GtTriggerMenuConfigOnlineProd.h:238
L1GtTriggerMenuConfigOnlineProd::TableMenuCond::gtObject2
std::string gtObject2
Definition: L1GtTriggerMenuConfigOnlineProd.h:90
Type4s
Definition: L1GtDefinitions.h:11
L1GtJetCountsTemplate
Definition: L1GtJetCountsTemplate.h:34
L1GtTriggerMenuConfigOnlineProd::m_tableMenuGeneral
TableMenuGeneral m_tableMenuGeneral
member to keep various tables retrieved from DB
Definition: L1GtTriggerMenuConfigOnlineProd.h:210
L1GtCaloTemplate::ObjectParameter::etaRange
unsigned int etaRange
Definition: L1GtCaloTemplate.h:58
L1GtTriggerMenuConfigOnlineProd.h
L1GtTriggerMenuConfigOnlineProd::TableMenuCond::deltaPhiRange
std::string deltaPhiRange
Definition: L1GtTriggerMenuConfigOnlineProd.h:104
ForJet
Definition: L1GtObject.h:33
CondHfRingEtSums
Definition: L1GtDefinitions.h:35
L1GtTriggerMenuConfigOnlineProd::TableMenuCond::chargeCorrelation
bool chargeCorrelation
Definition: L1GtTriggerMenuConfigOnlineProd.h:98
JetCounts
Definition: L1GtObject.h:39
l1t::OMDSReader::QueryResults::queryFailed
bool queryFailed() const
Definition: OMDSReader.h:59
L1GtTriggerMenuConfigOnlineProd::TableMenuAlgo::algAlias
std::string algAlias
Definition: L1GtTriggerMenuConfigOnlineProd.h:75
L1GtMuonTemplate::setConditionParameter
void setConditionParameter(const std::vector< ObjectParameter > &objParameter, const CorrelationParameter &corrParameter)
set functions
Definition: L1GtMuonTemplate.cc:66
L1GtTriggerMenuConfigOnlineProd::m_vecCaloTemplate
std::vector< std::vector< L1GtCaloTemplate > > m_vecCaloTemplate
Definition: L1GtTriggerMenuConfigOnlineProd.h:231
edm::isDebugEnabled
bool isDebugEnabled()
Definition: MessageLogger.cc:12
L1GtTriggerMenuConfigOnlineProd::addCaloCondition
void addCaloCondition(const TableMenuCond &)
Definition: L1GtTriggerMenuConfigOnlineProd.cc:1056
BPTX
Definition: L1GtObject.h:44
L1GtTriggerMenuConfigOnlineProd::TableMenuCond::objectParameter3FK
std::string objectParameter3FK
Definition: L1GtTriggerMenuConfigOnlineProd.h:101
L1TBPTX_cfi.bitNumber
bitNumber
Definition: L1TBPTX_cfi.py:26
L1GtTriggerMenuConfigOnlineProd::m_vecCastorTemplate
std::vector< std::vector< L1GtCastorTemplate > > m_vecCastorTemplate
Definition: L1GtTriggerMenuConfigOnlineProd.h:234
L1GtCaloTemplate::ObjectParameter::etThreshold
unsigned int etThreshold
Definition: L1GtCaloTemplate.h:57
L1GtTriggerMenuConfigOnlineProd::TableMenuCond
Definition: L1GtTriggerMenuConfigOnlineProd.h:85
l1t::OMDSReader::basicQueryView
const QueryResults basicQueryView(const std::vector< std::string > &columnNames, const std::string &schemaName, const std::string &viewName, const std::string &conditionLHS="", const QueryResults conditionRHS=QueryResults(), const std::string &conditionRHSName="")
Definition: OMDSReader.cc:158
L1GtTriggerMenuFwd.h
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:224
TypeNull
Definition: L1GtDefinitions.h:5
L1GtAlgorithm::setAlgoChipNumber
void setAlgoChipNumber(const int algoChipNumberValue)
Definition: L1GtAlgorithm.h:79
L1GtTriggerMenuConfigOnlineProd::buildAlgorithmMap
void buildAlgorithmMap()
build the algorithm map in the menu
Definition: L1GtTriggerMenuConfigOnlineProd.cc:721
L1GtTriggerMenuConfigOnlineProd::TableMenuCond::condType
std::string condType
Definition: L1GtTriggerMenuConfigOnlineProd.h:88
L1GtTriggerMenuConfigOnlineProd::convertLogicalExpression
std::string convertLogicalExpression(const std::string &, const std::map< int, std::string > &) const
convert a logical expression with indices to a logical expression with names
Definition: L1GtTriggerMenuConfigOnlineProd.cc:689
L1GtTriggerMenuConfigOnlineProd::m_corCaloTemplate
std::vector< std::vector< L1GtCaloTemplate > > m_corCaloTemplate
Definition: L1GtTriggerMenuConfigOnlineProd.h:242
L1GtTriggerMenuConfigOnlineProd::addCastorCondition
void addCastorCondition(const TableMenuCond &)
Definition: L1GtTriggerMenuConfigOnlineProd.cc:1326
L1GtTriggerMenuConfigOnlineProd::buildTechnicalTriggerMap
void buildTechnicalTriggerMap()
build the technical trigger map in the menu
Definition: L1GtTriggerMenuConfigOnlineProd.cc:749
L1GtTriggerMenuConfigOnlineProd::~L1GtTriggerMenuConfigOnlineProd
~L1GtTriggerMenuConfigOnlineProd() override
destructor
Definition: L1GtTriggerMenuConfigOnlineProd.cc:46
L1GtTriggerMenuConfigOnlineProd::m_tableMenuAlgoCond
std::vector< TableMenuAlgoCond > m_tableMenuAlgoCond
Definition: L1GtTriggerMenuConfigOnlineProd.h:212
L1GtTriggerMenuConfigOnlineProd::addMuonCondition
void addMuonCondition(const TableMenuCond &)
Definition: L1GtTriggerMenuConfigOnlineProd.cc:968
L1GtMuonTemplate::ObjectParameter::ptHighThreshold
unsigned int ptHighThreshold
Definition: L1GtMuonTemplate.h:57
L1GtTriggerMenuConfigOnlineProd::TableMenuCond::countThreshold
short countThreshold
Definition: L1GtTriggerMenuConfigOnlineProd.h:93
L1GtTriggerMenuConfigOnlineProd::tableMenuAlgoFromDB
bool tableMenuAlgoFromDB(const std::string &gtSchema, const std::string &objKey)
retrieve table with physics algorithms from DB
Definition: L1GtTriggerMenuConfigOnlineProd.cc:240
L1GtCastorTemplate
Definition: L1GtCastorTemplate.h:38
L1GtTriggerMenuConfigOnlineProd::m_corEnergySumTemplate
std::vector< std::vector< L1GtEnergySumTemplate > > m_corEnergySumTemplate
Definition: L1GtTriggerMenuConfigOnlineProd.h:243
L1GtObject
L1GtMuonTemplate::ObjectParameter::enableMip
bool enableMip
Definition: L1GtMuonTemplate.h:59
L1GtTriggerMenuConfigOnlineProd::TableMenuObjectParameters::enableIso
bool enableIso
Definition: L1GtTriggerMenuConfigOnlineProd.h:112
L1GtMuonTemplate
Definition: L1GtMuonTemplate.h:34
TypeHTT
Definition: L1GtDefinitions.h:14
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
L1GtEnergySumTemplate::ObjectParameter::etThreshold
unsigned int etThreshold
Definition: L1GtEnergySumTemplate.h:57
CondCorrelation
Definition: L1GtDefinitions.h:32