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