CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TriggerMenu.cc
Go to the documentation of this file.
1 
17 // this class header
19 
20 // system include files
21 #include <iostream>
22 #include <iomanip>
23 
24 // user include files
27 
28 
29 // forward declarations
30 
31 // constructor
33  : m_triggerMenuInterface( "NULL" ),
34  m_triggerMenuName( "NULL" ),
35  m_triggerMenuImplementation( "NULL" ),
36  m_scaleDbKey( "NULL" )
37 {
38  // empty
39 }
40 
42  const std::string& triggerMenuNameVal,
43  const unsigned int numberConditionChips,
44  const std::vector<std::vector<MuonTemplate> >& vecMuonTemplateVal,
45  const std::vector<std::vector<CaloTemplate> >& vecCaloTemplateVal,
46  const std::vector<std::vector<EnergySumTemplate> >& vecEnergySumTemplateVal,
47  const std::vector<std::vector<L1GtJetCountsTemplate> >& vecJetCountsTemplateVal,
48  const std::vector<std::vector<L1GtCastorTemplate> >& vecCastorTemplateVal,
49  const std::vector<std::vector<L1GtHfBitCountsTemplate> >& vecHfBitCountsTemplateVal,
50  const std::vector<std::vector<L1GtHfRingEtSumsTemplate> >& vecHfRingEtSumsTemplateVal,
51  const std::vector<std::vector<L1GtBptxTemplate> >& vecBptxTemplateVal,
52  const std::vector<std::vector<L1GtExternalTemplate> >& vecExternalTemplateVal,
53  const std::vector<std::vector<CorrelationTemplate> >& vecCorrelationTemplateVal,
54  const std::vector<std::vector<MuonTemplate> >& corMuonTemplateVal,
55  const std::vector<std::vector<CaloTemplate> >& corCaloTemplateVal,
56  const std::vector<std::vector<EnergySumTemplate> >& corEnergySumTemplateVal
57 
58 ) :
59  m_triggerMenuInterface( "NULL" ),
60  m_triggerMenuName(triggerMenuNameVal),
61  m_triggerMenuImplementation( "NULL" ),
62  m_scaleDbKey( "NULL" ),
63  m_vecMuonTemplate(vecMuonTemplateVal),
64  m_vecCaloTemplate(vecCaloTemplateVal),
65  m_vecEnergySumTemplate(vecEnergySumTemplateVal),
66  m_vecJetCountsTemplate(vecJetCountsTemplateVal),
67  m_vecCastorTemplate(vecCastorTemplateVal),
68  m_vecHfBitCountsTemplate(vecHfBitCountsTemplateVal),
69  m_vecHfRingEtSumsTemplate(vecHfRingEtSumsTemplateVal),
70  m_vecBptxTemplate(vecBptxTemplateVal),
71  m_vecExternalTemplate(vecExternalTemplateVal),
72  m_vecCorrelationTemplate(vecCorrelationTemplateVal),
73  m_corMuonTemplate(corMuonTemplateVal),
74  m_corCaloTemplate(corCaloTemplateVal),
75  m_corEnergySumTemplate(corEnergySumTemplateVal)
76 {
77 
78  m_conditionMap.resize(numberConditionChips);
80 
81 }
82 
83 // copy constructor
85 {
86 
91 
92  // copy physics conditions
102 
107 
108  // rebuild condition map to update the pointers
109  // (only physics conditions are included in it)
110  m_conditionMap.resize(rhs.m_conditionMap.size());
111  (*this).buildGtConditionMap();
112 
113  // copy algorithm map
116 
117  // copy technical triggers
118  // (separate map for technical triggers and physics triggers)
120 
121 }
122 
123 // destructor
125 {
126 
127  // loop over condition maps (one map per condition chip)
128  for (std::vector<l1t::ConditionMap>::iterator
129  itCondOnChip = m_conditionMap.begin(); itCondOnChip != m_conditionMap.end(); itCondOnChip++) {
130 
131  itCondOnChip->clear();
132 
133  }
134 
135  m_algorithmMap.clear();
136  m_algorithmAliasMap.clear();
137 }
138 
139 // assignment operator
141 
142  if ( this != &rhs ) {
143 
147 
157 
162 
165 
167 
168  }
169 
170  // rebuild condition map to update the pointers
171  // (only physics conditions are included in it)
172  m_conditionMap.resize(rhs.m_conditionMap.size());
173  (*this).buildGtConditionMap();
174 
175  // return the object
176  return *this;
177 
178 }
179 
180 // set the condition maps
181 void TriggerMenu::setGtConditionMap(const std::vector<l1t::ConditionMap>& condMap) {
182  m_conditionMap = condMap;
183 }
184 
185 // build the condition maps
187 
188  // clear the conditions from the maps, if any
189  for (std::vector<l1t::ConditionMap>::iterator itCondOnChip =
190  m_conditionMap.begin(); itCondOnChip != m_conditionMap.end(); itCondOnChip++) {
191 
192  itCondOnChip->clear();
193 
194  }
195 
196  // always check that the size of the condition map is greater than the size
197  // of the specific condition vector
198  size_t condMapSize = m_conditionMap.size();
199 
200  //
201  size_t vecMuonSize = m_vecMuonTemplate.size();
202  if (condMapSize < vecMuonSize) {
203  m_conditionMap.resize(vecMuonSize);
204  condMapSize = m_conditionMap.size();
205  }
206 
207  int chipNr = -1;
208 
209  for (std::vector<std::vector<MuonTemplate> >::iterator
210  itCondOnChip = m_vecMuonTemplate.begin();
211  itCondOnChip != m_vecMuonTemplate.end();
212  itCondOnChip++) {
213 
214  chipNr++;
215 
216  for (std::vector<MuonTemplate>::iterator
217  itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
218  itCond++) {
219 
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
233  itCondOnChip = m_vecCaloTemplate.begin();
234  itCondOnChip != m_vecCaloTemplate.end();
235  itCondOnChip++) {
236 
237  chipNr++;
238 
239  for (std::vector<CaloTemplate>::iterator
240  itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
241  itCond++) {
242 
243  (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
244  }
245  }
246 
247 
248  //
249  size_t vecEnergySumSize = m_vecEnergySumTemplate.size();
250  if (condMapSize < vecEnergySumSize) {
251  m_conditionMap.resize(vecEnergySumSize);
252  condMapSize = m_conditionMap.size();
253  }
254 
255  chipNr = -1;
256  for (std::vector<std::vector<EnergySumTemplate> >::iterator
257  itCondOnChip = m_vecEnergySumTemplate.begin();
258  itCondOnChip != m_vecEnergySumTemplate.end();
259  itCondOnChip++) {
260 
261  chipNr++;
262 
263  for (std::vector<EnergySumTemplate>::iterator
264  itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
265  itCond++) {
266 
267  (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
268  }
269  }
270 
272  /*
273  //
274  size_t vecJetCountsSize = m_vecJetCountsTemplate.size();
275  if (condMapSize < vecJetCountsSize) {
276  m_conditionMap.resize(vecJetCountsSize);
277  condMapSize = m_conditionMap.size();
278  }
279 
280  chipNr = -1;
281  for (std::vector<std::vector<L1GtJetCountsTemplate> >::iterator
282  itCondOnChip = m_vecJetCountsTemplate.begin();
283  itCondOnChip != m_vecJetCountsTemplate.end();
284  itCondOnChip++) {
285 
286  chipNr++;
287 
288  for (std::vector<L1GtJetCountsTemplate>::iterator
289  itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
290  itCond++) {
291 
292  (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
293  }
294  }
295 
296  //
297  size_t vecCastorSize = m_vecCastorTemplate.size();
298  if (condMapSize < vecCastorSize) {
299  m_conditionMap.resize(vecCastorSize);
300  condMapSize = m_conditionMap.size();
301  }
302 
303  chipNr = -1;
304  for (std::vector<std::vector<L1GtCastorTemplate> >::iterator
305  itCondOnChip = m_vecCastorTemplate.begin();
306  itCondOnChip != m_vecCastorTemplate.end();
307  itCondOnChip++) {
308 
309  chipNr++;
310 
311  for (std::vector<L1GtCastorTemplate>::iterator
312  itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
313  itCond++) {
314 
315  (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
316  }
317  }
318 
319  //
320  size_t vecHfBitCountsSize = m_vecHfBitCountsTemplate.size();
321  if (condMapSize < vecHfBitCountsSize) {
322  m_conditionMap.resize(vecHfBitCountsSize);
323  condMapSize = m_conditionMap.size();
324  }
325 
326  chipNr = -1;
327  for (std::vector<std::vector<L1GtHfBitCountsTemplate> >::iterator
328  itCondOnChip = m_vecHfBitCountsTemplate.begin();
329  itCondOnChip != m_vecHfBitCountsTemplate.end();
330  itCondOnChip++) {
331 
332  chipNr++;
333 
334  for (std::vector<L1GtHfBitCountsTemplate>::iterator
335  itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
336  itCond++) {
337 
338  (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
339  }
340  }
341 
342  //
343  size_t vecHfRingEtSumsSize = m_vecHfRingEtSumsTemplate.size();
344  if (condMapSize < vecHfRingEtSumsSize) {
345  m_conditionMap.resize(vecHfRingEtSumsSize);
346  condMapSize = m_conditionMap.size();
347  }
348 
349  chipNr = -1;
350  for (std::vector<std::vector<L1GtHfRingEtSumsTemplate> >::iterator
351  itCondOnChip = m_vecHfRingEtSumsTemplate.begin();
352  itCondOnChip != m_vecHfRingEtSumsTemplate.end();
353  itCondOnChip++) {
354 
355  chipNr++;
356 
357  for (std::vector<L1GtHfRingEtSumsTemplate>::iterator
358  itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
359  itCond++) {
360 
361  (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
362  }
363  }
364 
365  //
366  size_t vecBptxSize = m_vecBptxTemplate.size();
367  if (condMapSize < vecBptxSize) {
368  m_conditionMap.resize(vecBptxSize);
369  condMapSize = m_conditionMap.size();
370  }
371 
372  chipNr = -1;
373  for (std::vector<std::vector<L1GtBptxTemplate> >::iterator
374  itCondOnChip = m_vecBptxTemplate.begin();
375  itCondOnChip != m_vecBptxTemplate.end();
376  itCondOnChip++) {
377 
378  chipNr++;
379 
380  for (std::vector<L1GtBptxTemplate>::iterator
381  itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
382  itCond++) {
383 
384  (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
385  }
386  }
387 
388  //
389  size_t vecExternalSize = m_vecExternalTemplate.size();
390  if (condMapSize < vecExternalSize) {
391  m_conditionMap.resize(vecExternalSize);
392  condMapSize = m_conditionMap.size();
393  }
394 
395  chipNr = -1;
396  for (std::vector<std::vector<L1GtExternalTemplate> >::iterator
397  itCondOnChip = m_vecExternalTemplate.begin();
398  itCondOnChip != m_vecExternalTemplate.end();
399  itCondOnChip++) {
400 
401  chipNr++;
402 
403  for (std::vector<L1GtExternalTemplate>::iterator
404  itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
405  itCond++) {
406 
407  (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
408  }
409  }
410  */
411 
412  //
413  size_t vecCorrelationSize = m_vecCorrelationTemplate.size();
414  if (condMapSize < vecCorrelationSize) {
415  m_conditionMap.resize(vecCorrelationSize);
416  condMapSize = m_conditionMap.size();
417  }
418 
419  chipNr = -1;
420  for (std::vector<std::vector<CorrelationTemplate> >::iterator
421  itCondOnChip = m_vecCorrelationTemplate.begin();
422  itCondOnChip != m_vecCorrelationTemplate.end();
423  itCondOnChip++) {
424 
425  chipNr++;
426 
427  for (std::vector<CorrelationTemplate>::iterator
428  itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
429  itCond++) {
430 
431  (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
432  }
433  }
434 
435 
436 
437 
438 }
439 
440 // set the trigger menu name
442  m_triggerMenuInterface = menuInterface;
443 }
444 
446  m_triggerMenuName = menuName;
447 }
448 
450  m_triggerMenuImplementation = menuImplementation;
451 }
452 
453 // set menu associated scale key
455  m_scaleDbKey = scaleKey;
456 }
457 
458 // get / set the vectors containing the conditions
460  const std::vector<std::vector<MuonTemplate> >& vecMuonTempl) {
461 
462  m_vecMuonTemplate = vecMuonTempl;
463 }
464 
466  const std::vector<std::vector<CaloTemplate> >& vecCaloTempl) {
467 
468  m_vecCaloTemplate = vecCaloTempl;
469 }
470 
472  const std::vector<std::vector<EnergySumTemplate> >& vecEnergySumTempl) {
473 
474  m_vecEnergySumTemplate = vecEnergySumTempl;
475 }
476 
478  const std::vector<std::vector<L1GtJetCountsTemplate> >& vecJetCountsTempl) {
479 
480  m_vecJetCountsTemplate = vecJetCountsTempl;
481 }
482 
484  const std::vector<std::vector<L1GtCastorTemplate> >& vecCastorTempl) {
485 
486  m_vecCastorTemplate = vecCastorTempl;
487 }
488 
490  const std::vector<std::vector<L1GtHfBitCountsTemplate> >& vecHfBitCountsTempl) {
491 
492  m_vecHfBitCountsTemplate = vecHfBitCountsTempl;
493 }
494 
496  const std::vector<std::vector<L1GtHfRingEtSumsTemplate> >& vecHfRingEtSumsTempl) {
497 
498  m_vecHfRingEtSumsTemplate = vecHfRingEtSumsTempl;
499 }
500 
502  const std::vector<std::vector<L1GtBptxTemplate> >& vecBptxTempl) {
503 
504  m_vecBptxTemplate = vecBptxTempl;
505 }
506 
508  const std::vector<std::vector<L1GtExternalTemplate> >& vecExternalTempl) {
509 
510  m_vecExternalTemplate = vecExternalTempl;
511 }
512 
514  const std::vector<std::vector<CorrelationTemplate> >& vecCorrelationTempl) {
515 
516  m_vecCorrelationTemplate = vecCorrelationTempl;
517 }
518 
519 // set the vectors containing the conditions for correlation templates
521  const std::vector<std::vector<MuonTemplate> >& corMuonTempl) {
522 
523  m_corMuonTemplate = corMuonTempl;
524 }
525 
527  const std::vector<std::vector<CaloTemplate> >& corCaloTempl) {
528 
529  m_corCaloTemplate = corCaloTempl;
530 }
531 
533  const std::vector<std::vector<EnergySumTemplate> >& corEnergySumTempl) {
534 
535  m_corEnergySumTemplate = corEnergySumTempl;
536 }
537 
538 
539 
540 // set the algorithm map (by algorithm names)
542  m_algorithmMap = algoMap;
543 }
544 
545 // set the algorithm map (by algorithm aliases)
547  m_algorithmAliasMap = algoMap;
548 }
549 
550 // set the technical trigger map
552  m_technicalTriggerMap = ttMap;
553 }
554 
555 // print the trigger menu (bit number, algorithm name, logical expression)
556 void TriggerMenu::print(std::ostream& myCout, int& printVerbosity) const {
557 
558  // use another map <int, L1GtAlgorithm> to get the menu sorted after bit number
559  // both algorithm and bit numbers are unique
560  std::map<int, const L1GtAlgorithm*> algoBitToAlgo;
561  typedef std::map<int, const L1GtAlgorithm*>::const_iterator CItBit;
562 
563  for (l1t::CItAlgo itAlgo = m_algorithmMap.begin(); itAlgo != m_algorithmMap.end(); itAlgo++) {
564 
565  int bitNumber = (itAlgo->second).algoBitNumber();
566  algoBitToAlgo[bitNumber] = &(itAlgo->second);
567  }
568 
569  size_t nrDefinedAlgo = algoBitToAlgo.size();
570 
571  // idem for technical trigger map - only name and bit number are relevant for them
572  std::map<int, const L1GtAlgorithm*> ttBitToTt;
573 
574  for (l1t::CItAlgo itAlgo = m_technicalTriggerMap.begin(); itAlgo
575  != m_technicalTriggerMap.end(); itAlgo++) {
576 
577  int bitNumber = (itAlgo->second).algoBitNumber();
578  ttBitToTt[bitNumber] = &(itAlgo->second);
579  }
580 
581  size_t nrDefinedTechTrig = ttBitToTt.size();
582 
583  //
584 
585  switch (printVerbosity) {
586 
587  case 0: {
588 
589  // header for printing algorithms
590 
591  myCout << "\n ********** L1 Trigger Menu - printing ********** \n"
592  << "\nL1 Trigger Menu Interface: " << m_triggerMenuInterface
593  << "\nL1 Trigger Menu Name: " << m_triggerMenuName
594  << "\nL1 Trigger Menu Implementation: " << m_triggerMenuImplementation
595  << "\nAssociated Scale DB Key: " << m_scaleDbKey << "\n\n"
596  << "\nL1 Physics Algorithms: " << nrDefinedAlgo << " algorithms defined." << "\n\n"
597  << "Bit Number "
598  << std::right << std::setw(35) << "Algorithm Name" << " "
599  << std::right << std::setw(35) << "Algorithm Alias"
600  << std::endl;
601 
602  for (CItBit itBit = algoBitToAlgo.begin(); itBit != algoBitToAlgo.end(); itBit++) {
603 
604  int bitNumber = itBit->first;
605  std::string aName = (itBit->second)->algoName();
606  std::string aAlias = (itBit->second)->algoAlias();
607 
608  myCout << std::setw(6) << bitNumber << " "
609  << std::right << std::setw(35) << aName << " "
610  << std::right << std::setw(35) << aAlias
611  << std::endl;
612  }
613 
614  myCout
615  << "\nL1 Technical Triggers: " << nrDefinedTechTrig
616  << " technical triggers defined." << "\n\n" << std::endl;
617  if (nrDefinedTechTrig) {
618  myCout << "Bit Number " << " Technical trigger name " << std::endl;
619  }
620 
621  for (CItBit itBit = ttBitToTt.begin(); itBit != ttBitToTt.end(); itBit++) {
622 
623  int bitNumber = itBit->first;
624  std::string aName = (itBit->second)->algoName();
625  std::string aAlias = (itBit->second)->algoAlias();
626 
627  myCout << std::setw(6) << bitNumber << " "
628  << std::right << std::setw(35) << aName << " "
629  << std::right << std::setw(35) << aAlias
630  << std::endl;
631  }
632 
633  }
634  break;
635 
636  case 1: {
637 
638  // header for printing algorithms
639 
640  myCout << "\n ********** L1 Trigger Menu - printing ********** \n"
641  << "\nL1 Trigger Menu Interface: " << m_triggerMenuInterface
642  << "\nL1 Trigger Menu Name: " << m_triggerMenuName
643  << "\nL1 Trigger Menu Implementation: " << m_triggerMenuImplementation
644  << "\nAssociated Scale DB Key: " << m_scaleDbKey << "\n\n"
645  << "\nL1 Physics Algorithms: " << nrDefinedAlgo << " algorithms defined." << "\n\n"
646  << "Bit Number "
647  << std::right << std::setw(35) << "Algorithm Name" << " "
648  << std::right << std::setw(35) << "Algorithm Alias"
649  << "\n Logical Expression \n"
650  << std::endl;
651 
652  for (CItBit itBit = algoBitToAlgo.begin(); itBit != algoBitToAlgo.end(); itBit++) {
653 
654  int bitNumber = itBit->first;
655  std::string aName = (itBit->second)->algoName();
656  std::string aAlias = (itBit->second)->algoAlias();
657  std::string aLogicalExpression = (itBit->second)->algoLogicalExpression();
658 
659  myCout << std::setw(6) << bitNumber << " "
660  << std::right << std::setw(35) << aName << " "
661  << std::right << std::setw(35) << aAlias
662  << "\n Logical expression: " << aLogicalExpression << "\n"
663  << std::endl;
664  }
665 
666  myCout
667  << "\nL1 Technical Triggers: " << nrDefinedTechTrig
668  << " technical triggers defined." << "\n\n" << std::endl;
669  if (nrDefinedTechTrig) {
670  myCout << "Bit Number " << " Technical trigger name " << std::endl;
671  }
672 
673  for (CItBit itBit = ttBitToTt.begin(); itBit != ttBitToTt.end(); itBit++) {
674 
675  int bitNumber = itBit->first;
676  std::string aName = (itBit->second)->algoName();
677 
678  myCout << std::setw(6) << bitNumber << " " << aName << std::endl;
679  }
680  }
681  break;
682 
683  case 2: {
684 
685  // header for printing algorithms
686 
687  myCout << "\n ********** L1 Trigger Menu - printing ********** \n"
688  << "\nL1 Trigger Menu Interface: " << m_triggerMenuInterface
689  << "\nL1 Trigger Menu Name: " << m_triggerMenuName
690  << "\nL1 Trigger Menu Implementation: " << m_triggerMenuImplementation
691  << "\nAssociated Scale DB Key: " << m_scaleDbKey << "\n\n"
692  << "\nL1 Physics Algorithms: " << nrDefinedAlgo << " algorithms defined." << "\n\n"
693  << std::endl;
694 
695  for (CItBit itBit = algoBitToAlgo.begin(); itBit != algoBitToAlgo.end(); itBit++) {
696  (itBit->second)->print(myCout);
697  }
698 
699 
700  myCout << "\nNumber of condition chips: " << m_conditionMap.size() << "\n"
701  << std::endl;
702 
703  int chipNr = -1;
704  int totalNrConditions = 0;
705 
706  for (std::vector<l1t::ConditionMap>::const_iterator
707  itCondOnChip = m_conditionMap.begin();
708  itCondOnChip != m_conditionMap.end(); itCondOnChip++) {
709 
710  chipNr++;
711 
712  int condMapSize = itCondOnChip->size();
713  totalNrConditions += condMapSize;
714 
715  myCout << "\nTotal number of conditions on condition chip " << chipNr
716  << ": " << condMapSize
717  << " conditions.\n" << std::endl;
718 
719  for (l1t::CItCond itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
720  itCond++) {
721 
722  (itCond->second)->print(myCout);
723 
724  }
725 
726  }
727 
728  myCout << "\nTotal number of conditions on all condition chips: "
729  << totalNrConditions << "\n"
730  << std::endl;
731 
732  myCout
733  << "\nL1 Technical Triggers: " << nrDefinedTechTrig
734  << " technical triggers defined." << "\n\n" << std::endl;
735  if (nrDefinedTechTrig) {
736  myCout << "Bit Number " << " Technical trigger name " << std::endl;
737  }
738 
739  for (CItBit itBit = ttBitToTt.begin(); itBit != ttBitToTt.end(); itBit++) {
740 
741  int bitNumber = itBit->first;
742  std::string aName = (itBit->second)->algoName();
743 
744  myCout << std::setw(6) << bitNumber << " " << aName << std::endl;
745  }
746 
747 
748  }
749  break;
750 
751  default: {
752  myCout << "\n ********** L1 Trigger Menu - printing ********** \n\n"
753  << "Verbosity level: " << printVerbosity << " not implemented.\n\n"
754  << std::endl;
755  }
756  break;
757  }
758 
759 }
760 
761 // get the result for algorithm with name algName
762 // use directly the format of decisionWord (no typedef)
763 const bool TriggerMenu::gtAlgorithmResult(const std::string& algName,
764  const std::vector<bool>& decWord) const {
765 
766  bool algResult = false;
767 
768  l1t::CItAlgo itAlgo = m_algorithmMap.find(algName);
769  if (itAlgo != m_algorithmMap.end()) {
770  int bitNumber = (itAlgo->second).algoBitNumber();
771  algResult = decWord.at(bitNumber);
772  return algResult;
773  }
774 
775  // return false if the algorithm name is not found in the menu
776  // TODO throw exception or LogInfo would be better - but the class is used in
777  // XDAQ Trigger Supervisor (outside CMSSW) hence no CMSSW dependence
778  // is allowed here...
779 
780  return false;
781 
782 }
783 
784 
void setVecHfRingEtSumsTemplate(const std::vector< std::vector< L1GtHfRingEtSumsTemplate > > &)
Definition: TriggerMenu.cc:495
l1t::AlgorithmMap m_technicalTriggerMap
map containing the technical triggers
Definition: TriggerMenu.h:309
std::string m_triggerMenuName
Definition: TriggerMenu.h:279
void setCorCaloTemplate(const std::vector< std::vector< CaloTemplate > > &)
Definition: TriggerMenu.cc:526
void setVecBptxTemplate(const std::vector< std::vector< L1GtBptxTemplate > > &)
Definition: TriggerMenu.cc:501
void setVecHfBitCountsTemplate(const std::vector< std::vector< L1GtHfBitCountsTemplate > > &)
Definition: TriggerMenu.cc:489
std::string m_triggerMenuImplementation
Definition: TriggerMenu.h:280
void setCorMuonTemplate(const std::vector< std::vector< MuonTemplate > > &)
Definition: TriggerMenu.cc:520
void setGtTriggerMenuImplementation(const std::string &)
Definition: TriggerMenu.cc:449
void setGtAlgorithmMap(const l1t::AlgorithmMap &)
Definition: TriggerMenu.cc:541
std::string m_scaleDbKey
menu associated scale key
Definition: TriggerMenu.h:283
std::vector< std::vector< L1GtHfRingEtSumsTemplate > > m_vecHfRingEtSumsTemplate
Definition: TriggerMenu.h:293
std::vector< std::vector< L1GtHfBitCountsTemplate > > m_vecHfBitCountsTemplate
Definition: TriggerMenu.h:292
std::vector< std::vector< L1GtJetCountsTemplate > > m_vecJetCountsTemplate
Definition: TriggerMenu.h:290
std::vector< std::vector< MuonTemplate > > m_vecMuonTemplate
Definition: TriggerMenu.h:287
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
Definition: TriggerMenu.h:298
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
Definition: TriggerMenu.h:299
virtual ~TriggerMenu()
Definition: TriggerMenu.cc:124
void setGtScaleDbKey(const std::string &)
Definition: TriggerMenu.cc:454
ConditionMap::const_iterator CItCond
iterators through map containing the conditions
void buildGtConditionMap()
Definition: TriggerMenu.cc:186
std::vector< std::vector< EnergySumTemplate > > m_vecEnergySumTemplate
Definition: TriggerMenu.h:289
std::vector< std::vector< L1GtExternalTemplate > > m_vecExternalTemplate
Definition: TriggerMenu.h:295
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
void setVecEnergySumTemplate(const std::vector< std::vector< EnergySumTemplate > > &)
Definition: TriggerMenu.cc:471
l1t::AlgorithmMap m_algorithmMap
map containing the physics algorithms (by name)
Definition: TriggerMenu.h:303
void setVecMuonTemplate(const std::vector< std::vector< MuonTemplate > > &)
Definition: TriggerMenu.cc:459
void setCorEnergySumTemplate(const std::vector< std::vector< EnergySumTemplate > > &)
Definition: TriggerMenu.cc:532
void print(std::ostream &, int &) const
Definition: TriggerMenu.cc:556
void setGtConditionMap(const std::vector< l1t::ConditionMap > &)
Definition: TriggerMenu.cc:181
void setVecCastorTemplate(const std::vector< std::vector< L1GtCastorTemplate > > &)
Definition: TriggerMenu.cc:483
std::map< std::string, L1GtAlgorithm > AlgorithmMap
map containing the algorithms
void setGtTriggerMenuName(const std::string &)
Definition: TriggerMenu.cc:445
TriggerMenu & operator=(const TriggerMenu &)
Definition: TriggerMenu.cc:140
void setVecCorrelationTemplate(const std::vector< std::vector< CorrelationTemplate > > &)
Definition: TriggerMenu.cc:513
void setGtTechnicalTriggerMap(const l1t::AlgorithmMap &)
Definition: TriggerMenu.cc:551
std::vector< l1t::ConditionMap > m_conditionMap
map containing the conditions (per condition chip) - transient
Definition: TriggerMenu.h:273
void setGtAlgorithmAliasMap(const l1t::AlgorithmMap &)
Definition: TriggerMenu.cc:546
std::vector< std::vector< L1GtBptxTemplate > > m_vecBptxTemplate
Definition: TriggerMenu.h:294
void setVecJetCountsTemplate(const std::vector< std::vector< L1GtJetCountsTemplate > > &)
Definition: TriggerMenu.cc:477
l1t::AlgorithmMap m_algorithmAliasMap
map containing the physics algorithms (by alias)
Definition: TriggerMenu.h:306
void setVecExternalTemplate(const std::vector< std::vector< L1GtExternalTemplate > > &)
Definition: TriggerMenu.cc:507
void setVecCaloTemplate(const std::vector< std::vector< CaloTemplate > > &)
Definition: TriggerMenu.cc:465
const bool gtAlgorithmResult(const std::string &algName, const std::vector< bool > &decWord) const
Definition: TriggerMenu.cc:763
void setGtTriggerMenuInterface(const std::string &)
Definition: TriggerMenu.cc:441
std::vector< std::vector< L1GtCastorTemplate > > m_vecCastorTemplate
Definition: TriggerMenu.h:291
std::string m_triggerMenuInterface
menu names
Definition: TriggerMenu.h:278
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
Definition: TriggerMenu.h:300
std::vector< std::vector< CorrelationTemplate > > m_vecCorrelationTemplate
Definition: TriggerMenu.h:297
std::vector< std::vector< CaloTemplate > > m_vecCaloTemplate
Definition: TriggerMenu.h:288