CMS 3D CMS Logo

TriggerMenu.cc
Go to the documentation of this file.
1 
19 // this class header
21 
22 // system include files
23 #include <iostream>
24 #include <iomanip>
25 
26 // user include files
28 
29 // forward declarations
30 
31 // constructor
33  : m_triggerMenuInterface("NULL"),
34  m_triggerMenuName("NULL"),
35  m_triggerMenuImplementation(0x0),
36  m_scaleDbKey("NULL") {
37  // empty
38 }
39 
41  const std::string& triggerMenuNameVal,
42  const unsigned int numberConditionChips,
43  const std::vector<std::vector<MuonTemplate> >& vecMuonTemplateVal,
44  const std::vector<std::vector<MuonShowerTemplate> >& vecMuonShowerTemplateVal,
45  const std::vector<std::vector<CaloTemplate> >& vecCaloTemplateVal,
46  const std::vector<std::vector<EnergySumTemplate> >& vecEnergySumTemplateVal,
47  const std::vector<std::vector<EnergySumZdcTemplate> >& vecEnergySumZdcTemplateVal,
48  const std::vector<std::vector<AXOL1TLTemplate> >& vecAXOL1TLTemplateVal,
49  const std::vector<std::vector<ExternalTemplate> >& vecExternalTemplateVal,
50  const std::vector<std::vector<CorrelationTemplate> >& vecCorrelationTemplateVal,
51  const std::vector<std::vector<CorrelationThreeBodyTemplate> >& vecCorrelationThreeBodyTemplateVal,
52  const std::vector<std::vector<CorrelationWithOverlapRemovalTemplate> >& vecCorrelationWithOverlapRemovalTemplateVal,
53  const std::vector<std::vector<MuonTemplate> >& corMuonTemplateVal,
54  const std::vector<std::vector<CaloTemplate> >& corCaloTemplateVal,
55  const std::vector<std::vector<EnergySumTemplate> >& corEnergySumTemplateVal
56 
57  )
58  : m_triggerMenuInterface("NULL"),
59  m_triggerMenuName(triggerMenuNameVal),
60  m_triggerMenuImplementation(0x0),
61  m_scaleDbKey("NULL"),
62  m_vecMuonTemplate(vecMuonTemplateVal),
63  m_vecMuonShowerTemplate(vecMuonShowerTemplateVal),
64  m_vecCaloTemplate(vecCaloTemplateVal),
65  m_vecEnergySumTemplate(vecEnergySumTemplateVal),
66  m_vecEnergySumZdcTemplate(vecEnergySumZdcTemplateVal),
67  m_vecAXOL1TLTemplate(vecAXOL1TLTemplateVal),
68  m_vecExternalTemplate(vecExternalTemplateVal),
69  m_vecCorrelationTemplate(vecCorrelationTemplateVal),
70  m_vecCorrelationThreeBodyTemplate(vecCorrelationThreeBodyTemplateVal),
71  m_vecCorrelationWithOverlapRemovalTemplate(vecCorrelationWithOverlapRemovalTemplateVal),
72  m_corMuonTemplate(corMuonTemplateVal),
73  m_corCaloTemplate(corCaloTemplateVal),
74  m_corEnergySumTemplate(corEnergySumTemplateVal) {
75  m_conditionMap.resize(numberConditionChips);
78 }
79 
80 // copy constructor
87 
88  // copy physics conditions
96 
103 
104  // rebuild condition map to update the pointers
105  // (only physics conditions are included in it)
106  m_conditionMap.resize(rhs.m_conditionMap.size());
107  (*this).buildGtConditionMap();
108 
109  // copy algorithm map
112 
113  // copy technical triggers
114  // (separate map for technical triggers and physics triggers)
115  //m_technicalTriggerMap = rhs.m_technicalTriggerMap;
116 }
117 
118 // destructor
120  // loop over condition maps (one map per condition chip)
121  for (std::vector<l1t::ConditionMap>::iterator itCondOnChip = m_conditionMap.begin();
122  itCondOnChip != m_conditionMap.end();
123  itCondOnChip++) {
124  itCondOnChip->clear();
125  }
126 
127  m_algorithmMap.clear();
128  m_algorithmAliasMap.clear();
129 }
130 
131 // assignment operator
133  if (this != &rhs) {
138 
146 
153 
156 
157  // m_technicalTriggerMap = rhs.m_technicalTriggerMap;
158  }
159 
160  // rebuild condition map to update the pointers
161  // (only physics conditions are included in it)
162  m_conditionMap.resize(rhs.m_conditionMap.size());
163  (*this).buildGtConditionMap();
164 
165  // return the object
166  return *this;
167 }
168 
169 // set the condition maps
170 void TriggerMenu::setGtConditionMap(const std::vector<l1t::ConditionMap>& condMap) { m_conditionMap = condMap; }
171 
172 // build the condition maps
174  // clear the conditions from the maps, if any
175  for (std::vector<l1t::ConditionMap>::iterator itCondOnChip = m_conditionMap.begin();
176  itCondOnChip != m_conditionMap.end();
177  itCondOnChip++) {
178  itCondOnChip->clear();
179  }
180 
181  // always check that the size of the condition map is greater than the size
182  // of the specific condition vector
183  size_t condMapSize = m_conditionMap.size();
184 
185  //
186  size_t vecMuonSize = m_vecMuonTemplate.size();
187  if (condMapSize < vecMuonSize) {
188  m_conditionMap.resize(vecMuonSize);
189  condMapSize = m_conditionMap.size();
190  }
191 
192  int chipNr = -1;
193 
194  for (std::vector<std::vector<MuonTemplate> >::iterator itCondOnChip = m_vecMuonTemplate.begin();
195  itCondOnChip != m_vecMuonTemplate.end();
196  itCondOnChip++) {
197  chipNr++;
198 
199  for (std::vector<MuonTemplate>::iterator itCond = itCondOnChip->begin(); itCond != itCondOnChip->end(); itCond++) {
200  (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
201  }
202  }
203 
204  //
205  size_t vecMuonShowerSize = m_vecMuonShowerTemplate.size();
206  if (condMapSize < vecMuonShowerSize) {
207  m_conditionMap.resize(vecMuonShowerSize);
208  condMapSize = m_conditionMap.size();
209  }
210 
211  chipNr = -1;
212 
213  for (std::vector<std::vector<MuonShowerTemplate> >::iterator itCondOnChip = m_vecMuonShowerTemplate.begin();
214  itCondOnChip != m_vecMuonShowerTemplate.end();
215  itCondOnChip++) {
216  chipNr++;
217 
218  for (std::vector<MuonShowerTemplate>::iterator itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
219  itCond++) {
220  (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
221  }
222  }
223 
224  //
225  size_t vecCaloSize = m_vecCaloTemplate.size();
226  if (condMapSize < vecCaloSize) {
227  m_conditionMap.resize(vecCaloSize);
228  condMapSize = m_conditionMap.size();
229  }
230 
231  chipNr = -1;
232  for (std::vector<std::vector<CaloTemplate> >::iterator itCondOnChip = m_vecCaloTemplate.begin();
233  itCondOnChip != m_vecCaloTemplate.end();
234  itCondOnChip++) {
235  chipNr++;
236 
237  for (std::vector<CaloTemplate>::iterator itCond = itCondOnChip->begin(); itCond != itCondOnChip->end(); itCond++) {
238  (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
239  }
240  }
241 
242  //
243  size_t vecEnergySumSize = m_vecEnergySumTemplate.size();
244  if (condMapSize < vecEnergySumSize) {
245  m_conditionMap.resize(vecEnergySumSize);
246  condMapSize = m_conditionMap.size();
247  }
248 
249  chipNr = -1;
250  for (std::vector<std::vector<EnergySumTemplate> >::iterator itCondOnChip = m_vecEnergySumTemplate.begin();
251  itCondOnChip != m_vecEnergySumTemplate.end();
252  itCondOnChip++) {
253  chipNr++;
254 
255  for (std::vector<EnergySumTemplate>::iterator itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
256  itCond++) {
257  (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
258  }
259  }
260 
261  //
262  size_t vecEnergySumZdcSize = m_vecEnergySumZdcTemplate.size();
263  if (condMapSize < vecEnergySumZdcSize) {
264  m_conditionMap.resize(vecEnergySumZdcSize);
265  condMapSize = m_conditionMap.size();
266  }
267 
268  chipNr = -1;
269  for (std::vector<std::vector<EnergySumZdcTemplate> >::iterator itCondOnChip = m_vecEnergySumZdcTemplate.begin();
270  itCondOnChip != m_vecEnergySumZdcTemplate.end();
271  itCondOnChip++) {
272  chipNr++;
273 
274  for (std::vector<EnergySumZdcTemplate>::iterator itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
275  itCond++) {
276  (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
277  }
278  }
279 
280  //
281  size_t vecAXOL1TLSize = m_vecAXOL1TLTemplate.size();
282  if (condMapSize < vecAXOL1TLSize) {
283  m_conditionMap.resize(vecAXOL1TLSize);
284  condMapSize = m_conditionMap.size();
285  }
286 
287  chipNr = -1;
288 
289  for (std::vector<std::vector<AXOL1TLTemplate> >::iterator itCondOnChip = m_vecAXOL1TLTemplate.begin();
290  itCondOnChip != m_vecAXOL1TLTemplate.end();
291  itCondOnChip++) {
292  chipNr++;
293 
294  for (std::vector<AXOL1TLTemplate>::iterator itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
295  itCond++) {
296  (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
297  }
298  }
299 
301  //
302  //
303  size_t vecExternalSize = m_vecExternalTemplate.size();
304  if (condMapSize < vecExternalSize) {
305  m_conditionMap.resize(vecExternalSize);
306  condMapSize = m_conditionMap.size();
307  }
308 
309  chipNr = -1;
310  for (std::vector<std::vector<ExternalTemplate> >::iterator itCondOnChip = m_vecExternalTemplate.begin();
311  itCondOnChip != m_vecExternalTemplate.end();
312  itCondOnChip++) {
313  chipNr++;
314 
315  for (std::vector<ExternalTemplate>::iterator itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
316  itCond++) {
317  (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
318  }
319  }
320 
321  //
322  size_t vecCorrelationSize = m_vecCorrelationTemplate.size();
323  if (condMapSize < vecCorrelationSize) {
324  m_conditionMap.resize(vecCorrelationSize);
325  condMapSize = m_conditionMap.size();
326  }
327 
328  chipNr = -1;
329  for (std::vector<std::vector<CorrelationTemplate> >::iterator itCondOnChip = m_vecCorrelationTemplate.begin();
330  itCondOnChip != m_vecCorrelationTemplate.end();
331  itCondOnChip++) {
332  chipNr++;
333 
334  for (std::vector<CorrelationTemplate>::iterator itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
335  itCond++) {
336  (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
337  }
338  }
339 
340  //
341  size_t vecCorrelationThreeBodySize = m_vecCorrelationThreeBodyTemplate.size();
342  if (condMapSize < vecCorrelationThreeBodySize) {
343  m_conditionMap.resize(vecCorrelationThreeBodySize);
344  condMapSize = m_conditionMap.size();
345  }
346 
347  chipNr = -1;
348  for (std::vector<std::vector<CorrelationThreeBodyTemplate> >::iterator itCondOnChip =
350  itCondOnChip != m_vecCorrelationThreeBodyTemplate.end();
351  itCondOnChip++) {
352  chipNr++;
353 
354  for (std::vector<CorrelationThreeBodyTemplate>::iterator itCond = itCondOnChip->begin();
355  itCond != itCondOnChip->end();
356  itCond++) {
357  (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
358  }
359  }
360 
361  //
362  size_t vecCorrelationWORSize = m_vecCorrelationWithOverlapRemovalTemplate.size();
363  if (condMapSize < vecCorrelationWORSize) {
364  m_conditionMap.resize(vecCorrelationWORSize);
365  condMapSize = m_conditionMap.size();
366  }
367 
368  chipNr = -1;
369  for (std::vector<std::vector<CorrelationWithOverlapRemovalTemplate> >::iterator itCondOnChip =
371  itCondOnChip != m_vecCorrelationWithOverlapRemovalTemplate.end();
372  itCondOnChip++) {
373  chipNr++;
374 
375  for (std::vector<CorrelationWithOverlapRemovalTemplate>::iterator itCond = itCondOnChip->begin();
376  itCond != itCondOnChip->end();
377  itCond++) {
378  (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
379  }
380  }
381 }
382 
383 // set the trigger menu name
385  m_triggerMenuInterface = menuInterface;
386 }
387 
389 
390 void TriggerMenu::setGtTriggerMenuImplementation(const unsigned long menuImplementation) {
391  m_triggerMenuImplementation = menuImplementation;
392 }
393 
395 
396 // set menu associated scale key
397 void TriggerMenu::setGtScaleDbKey(const std::string& scaleKey) { m_scaleDbKey = scaleKey; }
398 
399 // set menu associated scale key
401 
402 // get / set the vectors containing the conditions
403 void TriggerMenu::setVecMuonTemplate(const std::vector<std::vector<MuonTemplate> >& vecMuonTempl) {
404  m_vecMuonTemplate = vecMuonTempl;
405 }
406 
407 void TriggerMenu::setVecCaloTemplate(const std::vector<std::vector<CaloTemplate> >& vecCaloTempl) {
408  m_vecCaloTemplate = vecCaloTempl;
409 }
410 
411 void TriggerMenu::setVecEnergySumTemplate(const std::vector<std::vector<EnergySumTemplate> >& vecEnergySumTempl) {
412  m_vecEnergySumTemplate = vecEnergySumTempl;
413 }
414 
416  const std::vector<std::vector<EnergySumZdcTemplate> >& vecEnergySumZdcTempl) {
417  m_vecEnergySumZdcTemplate = vecEnergySumZdcTempl;
418 }
419 
420 void TriggerMenu::setVecAXOL1TLTemplate(const std::vector<std::vector<AXOL1TLTemplate> >& vecAXOL1TLTempl) {
421  m_vecAXOL1TLTemplate = vecAXOL1TLTempl;
422 }
423 
424 void TriggerMenu::setVecExternalTemplate(const std::vector<std::vector<ExternalTemplate> >& vecExternalTempl) {
425  m_vecExternalTemplate = vecExternalTempl;
426 }
427 
428 void TriggerMenu::setVecCorrelationTemplate(const std::vector<std::vector<CorrelationTemplate> >& vecCorrelationTempl) {
429  m_vecCorrelationTemplate = vecCorrelationTempl;
430 }
431 
433  const std::vector<std::vector<CorrelationThreeBodyTemplate> >& vecCorrelationThreeBodyTempl) {
434  m_vecCorrelationThreeBodyTemplate = vecCorrelationThreeBodyTempl;
435 }
436 
438  const std::vector<std::vector<CorrelationWithOverlapRemovalTemplate> >& vecCorrelationTempl) {
439  m_vecCorrelationWithOverlapRemovalTemplate = vecCorrelationTempl;
440 }
441 
442 // set the vectors containing the conditions for correlation templates
443 void TriggerMenu::setCorMuonTemplate(const std::vector<std::vector<MuonTemplate> >& corMuonTempl) {
444  m_corMuonTemplate = corMuonTempl;
445 }
446 
447 void TriggerMenu::setCorCaloTemplate(const std::vector<std::vector<CaloTemplate> >& corCaloTempl) {
448  m_corCaloTemplate = corCaloTempl;
449 }
450 
451 void TriggerMenu::setCorEnergySumTemplate(const std::vector<std::vector<EnergySumTemplate> >& corEnergySumTempl) {
452  m_corEnergySumTemplate = corEnergySumTempl;
453 }
454 
455 // set the algorithm map (by algorithm names)
457 
458 // set the algorithm map (by algorithm aliases)
460 
461 /*
462 // set the technical trigger map
463 void TriggerMenu::setGtTechnicalTriggerMap(const l1t::AlgorithmMap& ttMap) {
464  m_technicalTriggerMap = ttMap;
465 }
466 */
467 
468 // print the trigger menu (bit number, algorithm name, logical expression)
469 void TriggerMenu::print(std::ostream& myCout, int& printVerbosity) const {
470  // use another map <int, GlobalAlgorithm> to get the menu sorted after bit number
471  // both algorithm and bit numbers are unique
472  std::map<int, const GlobalAlgorithm*> algoBitToAlgo;
473  typedef std::map<int, const GlobalAlgorithm*>::const_iterator CItBit;
474 
475  for (l1t::CItAlgo itAlgo = m_algorithmMap.begin(); itAlgo != m_algorithmMap.end(); itAlgo++) {
476  int bitNumber = (itAlgo->second).algoBitNumber();
477  algoBitToAlgo[bitNumber] = &(itAlgo->second);
478  }
479 
480  size_t nrDefinedAlgo = algoBitToAlgo.size();
481 
482  /*
483  // idem for technical trigger map - only name and bit number are relevant for them
484  std::map<int, const GlobalAlgorithm*> ttBitToTt;
485 
486  for (l1t::CItAlgo itAlgo = m_technicalTriggerMap.begin(); itAlgo
487  != m_technicalTriggerMap.end(); itAlgo++) {
488 
489  int bitNumber = (itAlgo->second).algoBitNumber();
490  ttBitToTt[bitNumber] = &(itAlgo->second);
491  }
492 
493  size_t nrDefinedTechTrig = ttBitToTt.size();
494 */
495  //
496 
497  switch (printVerbosity) {
498  case 0: {
499  // header for printing algorithms
500 
501  myCout << "\n ********** L1 Trigger Menu - printing ********** \n"
502  << "\nL1 Trigger Menu Interface: " << m_triggerMenuInterface
503  << "\nL1 Trigger Menu Name: " << m_triggerMenuName << "\nL1 Trigger Menu UUID (hash): 0x"
504  << std::hex << m_triggerMenuUUID << std::dec << "\nL1 Trigger Menu Firmware (hash): 0x" << std::hex
505  << m_triggerMenuImplementation << std::dec << "\nAssociated Scale DB Key: " << m_scaleDbKey << "\n\n"
506  << "\nL1 Physics Algorithms: " << nrDefinedAlgo << " algorithms defined."
507  << "\n\n"
508  << "Bit Number " << std::right << std::setw(35) << "Algorithm Name"
509  << " " << std::right << std::setw(35) << "Algorithm Alias" << std::endl;
510 
511  for (CItBit itBit = algoBitToAlgo.begin(); itBit != algoBitToAlgo.end(); itBit++) {
512  int bitNumber = itBit->first;
513  std::string aName = (itBit->second)->algoName();
514  std::string aAlias = (itBit->second)->algoAlias();
515 
516  myCout << std::setw(6) << bitNumber << " " << std::right << std::setw(35) << aName << " " << std::right
517  << std::setw(35) << aAlias << std::endl;
518  }
519  /*
520  myCout
521  << "\nL1 Technical Triggers: " << nrDefinedTechTrig
522  << " technical triggers defined." << "\n\n" << std::endl;
523  if (nrDefinedTechTrig) {
524  myCout << "Bit Number " << " Technical trigger name " << std::endl;
525  }
526 
527  for (CItBit itBit = ttBitToTt.begin(); itBit != ttBitToTt.end(); itBit++) {
528 
529  int bitNumber = itBit->first;
530  std::string aName = (itBit->second)->algoName();
531  std::string aAlias = (itBit->second)->algoAlias();
532 
533  myCout << std::setw(6) << bitNumber << " "
534  << std::right << std::setw(35) << aName << " "
535  << std::right << std::setw(35) << aAlias
536  << std::endl;
537  }
538 */
539  } break;
540 
541  case 1: {
542  // header for printing algorithms
543 
544  myCout << "\n ********** L1 Trigger Menu - printing ********** \n"
545  << "\nL1 Trigger Menu Interface: " << m_triggerMenuInterface
546  << "\nL1 Trigger Menu Name: " << m_triggerMenuName << "\nL1 Trigger Menu UUID (hash): 0x"
547  << std::hex << m_triggerMenuUUID << std::dec << "\nL1 Trigger Menu Firmware (hash): 0x" << std::hex
548  << m_triggerMenuImplementation << std::dec << "\nAssociated Scale DB Key: " << m_scaleDbKey << "\n\n"
549  << "\nL1 Physics Algorithms: " << nrDefinedAlgo << " algorithms defined."
550  << "\n\n"
551  << "Bit Number " << std::right << std::setw(35) << "Algorithm Name"
552  << " " << std::right << std::setw(35) << "Algorithm Alias"
553  << "\n Logical Expression \n"
554  << std::endl;
555 
556  for (CItBit itBit = algoBitToAlgo.begin(); itBit != algoBitToAlgo.end(); itBit++) {
557  int bitNumber = itBit->first;
558  std::string aName = (itBit->second)->algoName();
559  std::string aAlias = (itBit->second)->algoAlias();
560  std::string aLogicalExpression = (itBit->second)->algoLogicalExpression();
561 
562  myCout << std::setw(6) << bitNumber << " " << std::right << std::setw(35) << aName << " " << std::right
563  << std::setw(35) << aAlias << "\n Logical expression: " << aLogicalExpression << "\n"
564  << std::endl;
565  }
566  /*
567  myCout
568  << "\nL1 Technical Triggers: " << nrDefinedTechTrig
569  << " technical triggers defined." << "\n\n" << std::endl;
570  if (nrDefinedTechTrig) {
571  myCout << "Bit Number " << " Technical trigger name " << std::endl;
572  }
573 
574  for (CItBit itBit = ttBitToTt.begin(); itBit != ttBitToTt.end(); itBit++) {
575 
576  int bitNumber = itBit->first;
577  std::string aName = (itBit->second)->algoName();
578 
579  myCout << std::setw(6) << bitNumber << " " << aName << std::endl;
580  }
581 */
582  } break;
583 
584  case 2: {
585  // header for printing algorithms
586 
587  myCout << "\n ********** L1 Trigger Menu - printing ********** \n"
588  << "\nL1 Trigger Menu Interface: " << m_triggerMenuInterface
589  << "\nL1 Trigger Menu Name: " << m_triggerMenuName << "\nL1 Trigger Menu UUID (hash): 0x"
590  << std::hex << m_triggerMenuUUID << std::dec << "\nL1 Trigger Menu Firmware (hash): 0x" << std::hex
591  << m_triggerMenuImplementation << std::dec << "\nAssociated Scale DB Key: " << m_scaleDbKey << "\n\n"
592  << "\nL1 Physics Algorithms: " << nrDefinedAlgo << " algorithms defined."
593  << "\n\n"
594  << std::endl;
595 
596  for (CItBit itBit = algoBitToAlgo.begin(); itBit != algoBitToAlgo.end(); itBit++) {
597  (itBit->second)->print(myCout);
598  }
599 
600  myCout << "\nNumber of condition chips: " << m_conditionMap.size() << "\n" << std::endl;
601 
602  int chipNr = -1;
603  int totalNrConditions = 0;
604 
605  for (std::vector<l1t::ConditionMap>::const_iterator itCondOnChip = m_conditionMap.begin();
606  itCondOnChip != m_conditionMap.end();
607  itCondOnChip++) {
608  chipNr++;
609 
610  int condMapSize = itCondOnChip->size();
611  totalNrConditions += condMapSize;
612 
613  myCout << "\nTotal number of conditions on condition chip " << chipNr << ": " << condMapSize << " conditions.\n"
614  << std::endl;
615 
616  for (l1t::CItCond itCond = itCondOnChip->begin(); itCond != itCondOnChip->end(); itCond++) {
617  (itCond->second)->print(myCout);
618  }
619  }
620 
621  myCout << "\nTotal number of conditions on all condition chips: " << totalNrConditions << "\n" << std::endl;
622  /*
623  myCout
624  << "\nL1 Technical Triggers: " << nrDefinedTechTrig
625  << " technical triggers defined." << "\n\n" << std::endl;
626  if (nrDefinedTechTrig) {
627  myCout << "Bit Number " << " Technical trigger name " << std::endl;
628  }
629 
630  for (CItBit itBit = ttBitToTt.begin(); itBit != ttBitToTt.end(); itBit++) {
631 
632  int bitNumber = itBit->first;
633  std::string aName = (itBit->second)->algoName();
634 
635  myCout << std::setw(6) << bitNumber << " " << aName << std::endl;
636  }
637 */
638 
639  } break;
640 
641  default: {
642  myCout << "\n ********** L1 Trigger Menu - printing ********** \n\n"
643  << "Verbosity level: " << printVerbosity << " not implemented.\n\n"
644  << std::endl;
645  } break;
646  }
647 }
648 
649 // get the result for algorithm with name algName
650 // use directly the format of decisionWord (no typedef)
651 const bool TriggerMenu::gtAlgorithmResult(const std::string& algName, const std::vector<bool>& decWord) const {
652  bool algResult = false;
653 
654  l1t::CItAlgo itAlgo = m_algorithmMap.find(algName);
655  if (itAlgo != m_algorithmMap.end()) {
656  int bitNumber = (itAlgo->second).algoBitNumber();
657  algResult = decWord.at(bitNumber);
658  return algResult;
659  }
660 
661  // return false if the algorithm name is not found in the menu
662  // TODO throw exception or LogInfo would be better - but the class is used in
663  // XDAQ Trigger Supervisor (outside CMSSW) hence no CMSSW dependence
664  // is allowed here...
665 
666  return false;
667 }
std::string m_triggerMenuName
Definition: TriggerMenu.h:236
void setCorCaloTemplate(const std::vector< std::vector< CaloTemplate > > &)
Definition: TriggerMenu.cc:447
void setVecExternalTemplate(const std::vector< std::vector< ExternalTemplate > > &)
Definition: TriggerMenu.cc:424
void setCorMuonTemplate(const std::vector< std::vector< MuonTemplate > > &)
Definition: TriggerMenu.cc:443
void setGtAlgorithmMap(const l1t::AlgorithmMap &)
Definition: TriggerMenu.cc:456
std::string m_scaleDbKey
menu associated scale key
Definition: TriggerMenu.h:242
std::vector< std::vector< CorrelationThreeBodyTemplate > > m_vecCorrelationThreeBodyTemplate
Definition: TriggerMenu.h:256
void setVecAXOL1TLTemplate(const std::vector< std::vector< AXOL1TLTemplate > > &)
Definition: TriggerMenu.cc:420
std::vector< std::vector< MuonTemplate > > m_vecMuonTemplate
Definition: TriggerMenu.h:246
std::vector< std::vector< ExternalTemplate > > m_vecExternalTemplate
Definition: TriggerMenu.h:253
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
Definition: TriggerMenu.h:258
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
Definition: TriggerMenu.h:259
virtual ~TriggerMenu()
Definition: TriggerMenu.cc:119
void setVecCorrelationThreeBodyTemplate(const std::vector< std::vector< CorrelationThreeBodyTemplate > > &)
Definition: TriggerMenu.cc:432
void setGtScaleDbKey(const std::string &)
Definition: TriggerMenu.cc:397
void setGtScales(const l1t::GlobalScales &)
Definition: TriggerMenu.cc:400
ConditionMap::const_iterator CItCond
iterators through map containing the conditions
void buildGtConditionMap()
Definition: TriggerMenu.cc:173
std::vector< std::vector< EnergySumTemplate > > m_vecEnergySumTemplate
Definition: TriggerMenu.h:249
l1t::GlobalScales m_gtScales
map containing the technical triggers
Definition: TriggerMenu.h:272
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
void setVecEnergySumTemplate(const std::vector< std::vector< EnergySumTemplate > > &)
Definition: TriggerMenu.cc:411
l1t::AlgorithmMap m_algorithmMap
map containing the physics algorithms (by name)
Definition: TriggerMenu.h:263
void setGtTriggerMenuUUID(const unsigned long uuid)
Definition: TriggerMenu.cc:394
std::vector< std::vector< EnergySumZdcTemplate > > m_vecEnergySumZdcTemplate
Definition: TriggerMenu.h:250
std::vector< std::vector< CorrelationWithOverlapRemovalTemplate > > m_vecCorrelationWithOverlapRemovalTemplate
Definition: TriggerMenu.h:257
void setVecMuonTemplate(const std::vector< std::vector< MuonTemplate > > &)
Definition: TriggerMenu.cc:403
void setCorEnergySumTemplate(const std::vector< std::vector< EnergySumTemplate > > &)
Definition: TriggerMenu.cc:451
void setGtConditionMap(const std::vector< l1t::ConditionMap > &)
Definition: TriggerMenu.cc:170
void setVecEnergySumZdcTemplate(const std::vector< std::vector< EnergySumZdcTemplate > > &)
Definition: TriggerMenu.cc:415
void setVecCorrelationWithOverlapRemovalTemplate(const std::vector< std::vector< CorrelationWithOverlapRemovalTemplate > > &)
Definition: TriggerMenu.cc:437
void setGtTriggerMenuName(const std::string &)
Definition: TriggerMenu.cc:388
void setGtTriggerMenuImplementation(const unsigned long)
Definition: TriggerMenu.cc:390
const bool gtAlgorithmResult(const std::string &algName, const std::vector< bool > &decWord) const
Definition: TriggerMenu.cc:651
unsigned long m_triggerMenuUUID
Definition: TriggerMenu.h:239
std::vector< std::vector< AXOL1TLTemplate > > m_vecAXOL1TLTemplate
Definition: TriggerMenu.h:251
TriggerMenu & operator=(const TriggerMenu &)
Definition: TriggerMenu.cc:132
void setVecCorrelationTemplate(const std::vector< std::vector< CorrelationTemplate > > &)
Definition: TriggerMenu.cc:428
std::vector< l1t::ConditionMap > m_conditionMap
map containing the conditions (per condition chip) - transient
Definition: TriggerMenu.h:231
void setGtAlgorithmAliasMap(const l1t::AlgorithmMap &)
Definition: TriggerMenu.cc:459
l1t::AlgorithmMap m_algorithmAliasMap
map containing the physics algorithms (by alias)
Definition: TriggerMenu.h:266
unsigned long m_triggerMenuImplementation
Definition: TriggerMenu.h:237
void setVecCaloTemplate(const std::vector< std::vector< CaloTemplate > > &)
Definition: TriggerMenu.cc:407
void setGtTriggerMenuInterface(const std::string &)
Definition: TriggerMenu.cc:384
std::string m_triggerMenuInterface
menu names
Definition: TriggerMenu.h:235
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
Definition: TriggerMenu.h:260
std::map< std::string, GlobalAlgorithm > AlgorithmMap
map containing the algorithms
std::vector< std::vector< MuonShowerTemplate > > m_vecMuonShowerTemplate
Definition: TriggerMenu.h:247
void print(std::ostream &, int &) const
Definition: TriggerMenu.cc:469
std::vector< std::vector< CorrelationTemplate > > m_vecCorrelationTemplate
Definition: TriggerMenu.h:255
std::vector< std::vector< CaloTemplate > > m_vecCaloTemplate
Definition: TriggerMenu.h:248