test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1GtTriggerMenu.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<L1GtMuonTemplate> >& vecMuonTemplateVal,
45  const std::vector<std::vector<L1GtCaloTemplate> >& vecCaloTemplateVal,
46  const std::vector<std::vector<L1GtEnergySumTemplate> >& 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<L1GtCorrelationTemplate> >& vecCorrelationTemplateVal,
54  const std::vector<std::vector<L1GtMuonTemplate> >& corMuonTemplateVal,
55  const std::vector<std::vector<L1GtCaloTemplate> >& corCaloTemplateVal,
56  const std::vector<std::vector<L1GtEnergySumTemplate> >& 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<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 L1GtTriggerMenu::setGtConditionMap(const std::vector<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<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<L1GtMuonTemplate> >::iterator
210  itCondOnChip = m_vecMuonTemplate.begin();
211  itCondOnChip != m_vecMuonTemplate.end();
212  itCondOnChip++) {
213 
214  chipNr++;
215 
216  for (std::vector<L1GtMuonTemplate>::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<L1GtCaloTemplate> >::iterator
233  itCondOnChip = m_vecCaloTemplate.begin();
234  itCondOnChip != m_vecCaloTemplate.end();
235  itCondOnChip++) {
236 
237  chipNr++;
238 
239  for (std::vector<L1GtCaloTemplate>::iterator
240  itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
241  itCond++) {
242 
243  (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
244  }
245  }
246 
247  //
248  size_t vecEnergySumSize = m_vecEnergySumTemplate.size();
249  if (condMapSize < vecEnergySumSize) {
250  m_conditionMap.resize(vecEnergySumSize);
251  condMapSize = m_conditionMap.size();
252  }
253 
254  chipNr = -1;
255  for (std::vector<std::vector<L1GtEnergySumTemplate> >::iterator
256  itCondOnChip = m_vecEnergySumTemplate.begin();
257  itCondOnChip != m_vecEnergySumTemplate.end();
258  itCondOnChip++) {
259 
260  chipNr++;
261 
262  for (std::vector<L1GtEnergySumTemplate>::iterator
263  itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
264  itCond++) {
265 
266  (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
267  }
268  }
269 
270  //
271  size_t vecJetCountsSize = m_vecJetCountsTemplate.size();
272  if (condMapSize < vecJetCountsSize) {
273  m_conditionMap.resize(vecJetCountsSize);
274  condMapSize = m_conditionMap.size();
275  }
276 
277  chipNr = -1;
278  for (std::vector<std::vector<L1GtJetCountsTemplate> >::iterator
279  itCondOnChip = m_vecJetCountsTemplate.begin();
280  itCondOnChip != m_vecJetCountsTemplate.end();
281  itCondOnChip++) {
282 
283  chipNr++;
284 
285  for (std::vector<L1GtJetCountsTemplate>::iterator
286  itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
287  itCond++) {
288 
289  (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
290  }
291  }
292 
293 
294  //
295  size_t vecCastorSize = m_vecCastorTemplate.size();
296  if (condMapSize < vecCastorSize) {
297  m_conditionMap.resize(vecCastorSize);
298  condMapSize = m_conditionMap.size();
299  }
300 
301  chipNr = -1;
302  for (std::vector<std::vector<L1GtCastorTemplate> >::iterator
303  itCondOnChip = m_vecCastorTemplate.begin();
304  itCondOnChip != m_vecCastorTemplate.end();
305  itCondOnChip++) {
306 
307  chipNr++;
308 
309  for (std::vector<L1GtCastorTemplate>::iterator
310  itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
311  itCond++) {
312 
313  (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
314  }
315  }
316 
317  //
318  size_t vecHfBitCountsSize = m_vecHfBitCountsTemplate.size();
319  if (condMapSize < vecHfBitCountsSize) {
320  m_conditionMap.resize(vecHfBitCountsSize);
321  condMapSize = m_conditionMap.size();
322  }
323 
324  chipNr = -1;
325  for (std::vector<std::vector<L1GtHfBitCountsTemplate> >::iterator
326  itCondOnChip = m_vecHfBitCountsTemplate.begin();
327  itCondOnChip != m_vecHfBitCountsTemplate.end();
328  itCondOnChip++) {
329 
330  chipNr++;
331 
332  for (std::vector<L1GtHfBitCountsTemplate>::iterator
333  itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
334  itCond++) {
335 
336  (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
337  }
338  }
339 
340  //
341  size_t vecHfRingEtSumsSize = m_vecHfRingEtSumsTemplate.size();
342  if (condMapSize < vecHfRingEtSumsSize) {
343  m_conditionMap.resize(vecHfRingEtSumsSize);
344  condMapSize = m_conditionMap.size();
345  }
346 
347  chipNr = -1;
348  for (std::vector<std::vector<L1GtHfRingEtSumsTemplate> >::iterator
349  itCondOnChip = m_vecHfRingEtSumsTemplate.begin();
350  itCondOnChip != m_vecHfRingEtSumsTemplate.end();
351  itCondOnChip++) {
352 
353  chipNr++;
354 
355  for (std::vector<L1GtHfRingEtSumsTemplate>::iterator
356  itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
357  itCond++) {
358 
359  (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
360  }
361  }
362 
363  //
364  size_t vecBptxSize = m_vecBptxTemplate.size();
365  if (condMapSize < vecBptxSize) {
366  m_conditionMap.resize(vecBptxSize);
367  condMapSize = m_conditionMap.size();
368  }
369 
370  chipNr = -1;
371  for (std::vector<std::vector<L1GtBptxTemplate> >::iterator
372  itCondOnChip = m_vecBptxTemplate.begin();
373  itCondOnChip != m_vecBptxTemplate.end();
374  itCondOnChip++) {
375 
376  chipNr++;
377 
378  for (std::vector<L1GtBptxTemplate>::iterator
379  itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
380  itCond++) {
381 
382  (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
383  }
384  }
385 
386  //
387  size_t vecExternalSize = m_vecExternalTemplate.size();
388  if (condMapSize < vecExternalSize) {
389  m_conditionMap.resize(vecExternalSize);
390  condMapSize = m_conditionMap.size();
391  }
392 
393  chipNr = -1;
394  for (std::vector<std::vector<L1GtExternalTemplate> >::iterator
395  itCondOnChip = m_vecExternalTemplate.begin();
396  itCondOnChip != m_vecExternalTemplate.end();
397  itCondOnChip++) {
398 
399  chipNr++;
400 
401  for (std::vector<L1GtExternalTemplate>::iterator
402  itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
403  itCond++) {
404 
405  (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
406  }
407  }
408 
409  //
410  size_t vecCorrelationSize = m_vecCorrelationTemplate.size();
411  if (condMapSize < vecCorrelationSize) {
412  m_conditionMap.resize(vecCorrelationSize);
413  condMapSize = m_conditionMap.size();
414  }
415 
416  chipNr = -1;
417  for (std::vector<std::vector<L1GtCorrelationTemplate> >::iterator
418  itCondOnChip = m_vecCorrelationTemplate.begin();
419  itCondOnChip != m_vecCorrelationTemplate.end();
420  itCondOnChip++) {
421 
422  chipNr++;
423 
424  for (std::vector<L1GtCorrelationTemplate>::iterator
425  itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
426  itCond++) {
427 
428  (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
429  }
430  }
431 
432 
433 
434 
435 }
436 
437 // set the trigger menu name
439  m_triggerMenuInterface = menuInterface;
440 }
441 
443  m_triggerMenuName = menuName;
444 }
445 
447  m_triggerMenuImplementation = menuImplementation;
448 }
449 
450 // set menu associated scale key
452  m_scaleDbKey = scaleKey;
453 }
454 
455 // get / set the vectors containing the conditions
457  const std::vector<std::vector<L1GtMuonTemplate> >& vecMuonTempl) {
458 
459  m_vecMuonTemplate = vecMuonTempl;
460 }
461 
463  const std::vector<std::vector<L1GtCaloTemplate> >& vecCaloTempl) {
464 
465  m_vecCaloTemplate = vecCaloTempl;
466 }
467 
469  const std::vector<std::vector<L1GtEnergySumTemplate> >& vecEnergySumTempl) {
470 
471  m_vecEnergySumTemplate = vecEnergySumTempl;
472 }
473 
475  const std::vector<std::vector<L1GtJetCountsTemplate> >& vecJetCountsTempl) {
476 
477  m_vecJetCountsTemplate = vecJetCountsTempl;
478 }
479 
481  const std::vector<std::vector<L1GtCastorTemplate> >& vecCastorTempl) {
482 
483  m_vecCastorTemplate = vecCastorTempl;
484 }
485 
487  const std::vector<std::vector<L1GtHfBitCountsTemplate> >& vecHfBitCountsTempl) {
488 
489  m_vecHfBitCountsTemplate = vecHfBitCountsTempl;
490 }
491 
493  const std::vector<std::vector<L1GtHfRingEtSumsTemplate> >& vecHfRingEtSumsTempl) {
494 
495  m_vecHfRingEtSumsTemplate = vecHfRingEtSumsTempl;
496 }
497 
499  const std::vector<std::vector<L1GtBptxTemplate> >& vecBptxTempl) {
500 
501  m_vecBptxTemplate = vecBptxTempl;
502 }
503 
505  const std::vector<std::vector<L1GtExternalTemplate> >& vecExternalTempl) {
506 
507  m_vecExternalTemplate = vecExternalTempl;
508 }
509 
511  const std::vector<std::vector<L1GtCorrelationTemplate> >& vecCorrelationTempl) {
512 
513  m_vecCorrelationTemplate = vecCorrelationTempl;
514 }
515 
516 // set the vectors containing the conditions for correlation templates
518  const std::vector<std::vector<L1GtMuonTemplate> >& corMuonTempl) {
519 
520  m_corMuonTemplate = corMuonTempl;
521 }
522 
524  const std::vector<std::vector<L1GtCaloTemplate> >& corCaloTempl) {
525 
526  m_corCaloTemplate = corCaloTempl;
527 }
528 
530  const std::vector<std::vector<L1GtEnergySumTemplate> >& corEnergySumTempl) {
531 
532  m_corEnergySumTemplate = corEnergySumTempl;
533 }
534 
535 
536 
537 // set the algorithm map (by algorithm names)
539  m_algorithmMap = algoMap;
540 }
541 
542 // set the algorithm map (by algorithm aliases)
544  m_algorithmAliasMap = algoMap;
545 }
546 
547 // set the technical trigger map
549  m_technicalTriggerMap = ttMap;
550 }
551 
552 // print the trigger menu (bit number, algorithm name, logical expression)
553 void L1GtTriggerMenu::print(std::ostream& myCout, int& printVerbosity) const {
554 
555  // use another map <int, L1GtAlgorithm> to get the menu sorted after bit number
556  // both algorithm and bit numbers are unique
557  std::map<int, const L1GtAlgorithm*> algoBitToAlgo;
558  typedef std::map<int, const L1GtAlgorithm*>::const_iterator CItBit;
559 
560  for (CItAlgo itAlgo = m_algorithmMap.begin(); itAlgo != m_algorithmMap.end(); itAlgo++) {
561 
562  int bitNumber = (itAlgo->second).algoBitNumber();
563  algoBitToAlgo[bitNumber] = &(itAlgo->second);
564  }
565 
566  size_t nrDefinedAlgo = algoBitToAlgo.size();
567 
568  // idem for technical trigger map - only name and bit number are relevant for them
569  std::map<int, const L1GtAlgorithm*> ttBitToTt;
570 
571  for (CItAlgo itAlgo = m_technicalTriggerMap.begin(); itAlgo
572  != m_technicalTriggerMap.end(); itAlgo++) {
573 
574  int bitNumber = (itAlgo->second).algoBitNumber();
575  ttBitToTt[bitNumber] = &(itAlgo->second);
576  }
577 
578  size_t nrDefinedTechTrig = ttBitToTt.size();
579 
580  //
581 
582  switch (printVerbosity) {
583 
584  case 0: {
585 
586  // header for printing algorithms
587 
588  myCout << "\n ********** L1 Trigger Menu - printing ********** \n"
589  << "\nL1 Trigger Menu Interface: " << m_triggerMenuInterface
590  << "\nL1 Trigger Menu Name: " << m_triggerMenuName
591  << "\nL1 Trigger Menu Implementation: " << m_triggerMenuImplementation
592  << "\nAssociated Scale DB Key: " << m_scaleDbKey << "\n\n"
593  << "\nL1 Physics Algorithms: " << nrDefinedAlgo << " algorithms defined." << "\n\n"
594  << "Bit Number "
595  << std::right << std::setw(35) << "Algorithm Name" << " "
596  << std::right << std::setw(35) << "Algorithm Alias"
597  << std::endl;
598 
599  for (CItBit itBit = algoBitToAlgo.begin(); itBit != algoBitToAlgo.end(); itBit++) {
600 
601  int bitNumber = itBit->first;
602  std::string aName = (itBit->second)->algoName();
603  std::string aAlias = (itBit->second)->algoAlias();
604 
605  myCout << std::setw(6) << bitNumber << " "
606  << std::right << std::setw(35) << aName << " "
607  << std::right << std::setw(35) << aAlias
608  << std::endl;
609  }
610 
611  myCout
612  << "\nL1 Technical Triggers: " << nrDefinedTechTrig
613  << " technical triggers defined." << "\n\n" << std::endl;
614  if (nrDefinedTechTrig) {
615  myCout << "Bit Number " << " Technical trigger name " << std::endl;
616  }
617 
618  for (CItBit itBit = ttBitToTt.begin(); itBit != ttBitToTt.end(); itBit++) {
619 
620  int bitNumber = itBit->first;
621  std::string aName = (itBit->second)->algoName();
622  std::string aAlias = (itBit->second)->algoAlias();
623 
624  myCout << std::setw(6) << bitNumber << " "
625  << std::right << std::setw(35) << aName << " "
626  << std::right << std::setw(35) << aAlias
627  << std::endl;
628  }
629 
630  }
631  break;
632 
633  case 1: {
634 
635  // header for printing algorithms
636 
637  myCout << "\n ********** L1 Trigger Menu - printing ********** \n"
638  << "\nL1 Trigger Menu Interface: " << m_triggerMenuInterface
639  << "\nL1 Trigger Menu Name: " << m_triggerMenuName
640  << "\nL1 Trigger Menu Implementation: " << m_triggerMenuImplementation
641  << "\nAssociated Scale DB Key: " << m_scaleDbKey << "\n\n"
642  << "\nL1 Physics Algorithms: " << nrDefinedAlgo << " algorithms defined." << "\n\n"
643  << "Bit Number "
644  << std::right << std::setw(35) << "Algorithm Name" << " "
645  << std::right << std::setw(35) << "Algorithm Alias"
646  << "\n Logical Expression \n"
647  << std::endl;
648 
649  for (CItBit itBit = algoBitToAlgo.begin(); itBit != algoBitToAlgo.end(); itBit++) {
650 
651  int bitNumber = itBit->first;
652  std::string aName = (itBit->second)->algoName();
653  std::string aAlias = (itBit->second)->algoAlias();
654  std::string aLogicalExpression = (itBit->second)->algoLogicalExpression();
655 
656  myCout << std::setw(6) << bitNumber << " "
657  << std::right << std::setw(35) << aName << " "
658  << std::right << std::setw(35) << aAlias
659  << "\n Logical expression: " << aLogicalExpression << "\n"
660  << std::endl;
661  }
662 
663  myCout
664  << "\nL1 Technical Triggers: " << nrDefinedTechTrig
665  << " technical triggers defined." << "\n\n" << std::endl;
666  if (nrDefinedTechTrig) {
667  myCout << "Bit Number " << " Technical trigger name " << std::endl;
668  }
669 
670  for (CItBit itBit = ttBitToTt.begin(); itBit != ttBitToTt.end(); itBit++) {
671 
672  int bitNumber = itBit->first;
673  std::string aName = (itBit->second)->algoName();
674 
675  myCout << std::setw(6) << bitNumber << " " << aName << std::endl;
676  }
677  }
678  break;
679 
680  case 2: {
681 
682  // header for printing algorithms
683 
684  myCout << "\n ********** L1 Trigger Menu - printing ********** \n"
685  << "\nL1 Trigger Menu Interface: " << m_triggerMenuInterface
686  << "\nL1 Trigger Menu Name: " << m_triggerMenuName
687  << "\nL1 Trigger Menu Implementation: " << m_triggerMenuImplementation
688  << "\nAssociated Scale DB Key: " << m_scaleDbKey << "\n\n"
689  << "\nL1 Physics Algorithms: " << nrDefinedAlgo << " algorithms defined." << "\n\n"
690  << std::endl;
691 
692  for (CItBit itBit = algoBitToAlgo.begin(); itBit != algoBitToAlgo.end(); itBit++) {
693  (itBit->second)->print(myCout);
694  }
695 
696 
697  myCout << "\nNumber of condition chips: " << m_conditionMap.size() << "\n"
698  << std::endl;
699 
700  int chipNr = -1;
701  int totalNrConditions = 0;
702 
703  for (std::vector<ConditionMap>::const_iterator
704  itCondOnChip = m_conditionMap.begin();
705  itCondOnChip != m_conditionMap.end(); itCondOnChip++) {
706 
707  chipNr++;
708 
709  int condMapSize = itCondOnChip->size();
710  totalNrConditions += condMapSize;
711 
712  myCout << "\nTotal number of conditions on condition chip " << chipNr
713  << ": " << condMapSize
714  << " conditions.\n" << std::endl;
715 
716  for (CItCond itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
717  itCond++) {
718 
719  (itCond->second)->print(myCout);
720 
721  }
722 
723  }
724 
725  myCout << "\nTotal number of conditions on all condition chips: "
726  << totalNrConditions << "\n"
727  << std::endl;
728 
729  myCout
730  << "\nL1 Technical Triggers: " << nrDefinedTechTrig
731  << " technical triggers defined." << "\n\n" << std::endl;
732  if (nrDefinedTechTrig) {
733  myCout << "Bit Number " << " Technical trigger name " << std::endl;
734  }
735 
736  for (CItBit itBit = ttBitToTt.begin(); itBit != ttBitToTt.end(); itBit++) {
737 
738  int bitNumber = itBit->first;
739  std::string aName = (itBit->second)->algoName();
740 
741  myCout << std::setw(6) << bitNumber << " " << aName << std::endl;
742  }
743 
744 
745  }
746  break;
747 
748  default: {
749  myCout << "\n ********** L1 Trigger Menu - printing ********** \n\n"
750  << "Verbosity level: " << printVerbosity << " not implemented.\n\n"
751  << std::endl;
752  }
753  break;
754  }
755 
756 }
757 
758 // get the result for algorithm with name algName
759 // use directly the format of decisionWord (no typedef)
761  const std::vector<bool>& decWord) const {
762 
763  bool algResult = false;
764 
765  CItAlgo itAlgo = m_algorithmMap.find(algName);
766  if (itAlgo != m_algorithmMap.end()) {
767  int bitNumber = (itAlgo->second).algoBitNumber();
768  algResult = decWord.at(bitNumber);
769  return algResult;
770  }
771 
772  // return false if the algorithm name is not found in the menu
773  // TODO throw exception or LogInfo would be better - but the class is used in
774  // XDAQ Trigger Supervisor (outside CMSSW) hence no CMSSW dependence
775  // is allowed here...
776 
777  return false;
778 
779 }
780 
781 
std::vector< std::vector< L1GtBptxTemplate > > m_vecBptxTemplate
AlgorithmMap m_algorithmAliasMap
map containing the physics algorithms (by alias)
std::vector< std::vector< L1GtCaloTemplate > > m_vecCaloTemplate
void setGtScaleDbKey(const std::string &)
std::vector< std::vector< L1GtMuonTemplate > > m_vecMuonTemplate
std::vector< std::vector< L1GtHfBitCountsTemplate > > m_vecHfBitCountsTemplate
L1GtTriggerMenu & operator=(const L1GtTriggerMenu &)
void setGtAlgorithmMap(const AlgorithmMap &)
std::vector< std::vector< L1GtMuonTemplate > > m_corMuonTemplate
std::map< std::string, L1GtAlgorithm > AlgorithmMap
map containing the algorithms
void setCorCaloTemplate(const std::vector< std::vector< L1GtCaloTemplate > > &)
ConditionMap::const_iterator CItCond
iterators through map containing the conditions
void setGtTechnicalTriggerMap(const AlgorithmMap &)
void setGtTriggerMenuInterface(const std::string &)
std::vector< ConditionMap > m_conditionMap
map containing the conditions (per condition chip) - transient
void setVecHfBitCountsTemplate(const std::vector< std::vector< L1GtHfBitCountsTemplate > > &)
void setVecCastorTemplate(const std::vector< std::vector< L1GtCastorTemplate > > &)
void setVecCaloTemplate(const std::vector< std::vector< L1GtCaloTemplate > > &)
void setGtAlgorithmAliasMap(const AlgorithmMap &)
void setVecBptxTemplate(const std::vector< std::vector< L1GtBptxTemplate > > &)
void setGtConditionMap(const std::vector< ConditionMap > &)
std::vector< std::vector< L1GtJetCountsTemplate > > m_vecJetCountsTemplate
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
void setVecCorrelationTemplate(const std::vector< std::vector< L1GtCorrelationTemplate > > &)
std::vector< std::vector< L1GtCastorTemplate > > m_vecCastorTemplate
std::string m_scaleDbKey
menu associated scale key
void print(std::ostream &, int &) const
void setGtTriggerMenuImplementation(const std::string &)
void setVecJetCountsTemplate(const std::vector< std::vector< L1GtJetCountsTemplate > > &)
const bool gtAlgorithmResult(const std::string &algName, const std::vector< bool > &decWord) const
void setCorMuonTemplate(const std::vector< std::vector< L1GtMuonTemplate > > &)
std::string m_triggerMenuName
void setCorEnergySumTemplate(const std::vector< std::vector< L1GtEnergySumTemplate > > &)
void setVecMuonTemplate(const std::vector< std::vector< L1GtMuonTemplate > > &)
void setVecEnergySumTemplate(const std::vector< std::vector< L1GtEnergySumTemplate > > &)
virtual ~L1GtTriggerMenu()
std::vector< std::vector< L1GtCaloTemplate > > m_corCaloTemplate
std::vector< std::vector< L1GtEnergySumTemplate > > m_vecEnergySumTemplate
void setGtTriggerMenuName(const std::string &)
std::vector< std::vector< L1GtExternalTemplate > > m_vecExternalTemplate
std::vector< std::vector< L1GtHfRingEtSumsTemplate > > m_vecHfRingEtSumsTemplate
std::vector< std::vector< L1GtEnergySumTemplate > > m_corEnergySumTemplate
AlgorithmMap m_technicalTriggerMap
map containing the technical triggers
std::vector< std::vector< L1GtCorrelationTemplate > > m_vecCorrelationTemplate
std::string m_triggerMenuImplementation
void setVecExternalTemplate(const std::vector< std::vector< L1GtExternalTemplate > > &)
AlgorithmMap m_algorithmMap
map containing the physics algorithms (by name)
void setVecHfRingEtSumsTemplate(const std::vector< std::vector< L1GtHfRingEtSumsTemplate > > &)
std::string m_triggerMenuInterface
menu names