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  }
390 
391  chipNr = -1;
392  for (std::vector<std::vector<CorrelationWithOverlapRemovalTemplate> >::iterator itCondOnChip =
394  itCondOnChip != m_vecCorrelationWithOverlapRemovalTemplate.end();
395  itCondOnChip++) {
396  chipNr++;
397 
398  for (std::vector<CorrelationWithOverlapRemovalTemplate>::iterator itCond = itCondOnChip->begin();
399  itCond != itCondOnChip->end();
400  itCond++) {
401  (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
402  }
403  }
404 }
405 
406 // set the trigger menu name
408  m_triggerMenuInterface = menuInterface;
409 }
410 
412 
413 void TriggerMenu::setGtTriggerMenuImplementation(const unsigned long menuImplementation) {
414  m_triggerMenuImplementation = menuImplementation;
415 }
416 
418 
419 // set menu associated scale key
420 void TriggerMenu::setGtScaleDbKey(const std::string& scaleKey) { m_scaleDbKey = scaleKey; }
421 
422 // set menu associated scale key
424 
425 // get / set the vectors containing the conditions
426 void TriggerMenu::setVecMuonTemplate(const std::vector<std::vector<MuonTemplate> >& vecMuonTempl) {
427  m_vecMuonTemplate = vecMuonTempl;
428 }
429 
430 void TriggerMenu::setVecCaloTemplate(const std::vector<std::vector<CaloTemplate> >& vecCaloTempl) {
431  m_vecCaloTemplate = vecCaloTempl;
432 }
433 
434 void TriggerMenu::setVecEnergySumTemplate(const std::vector<std::vector<EnergySumTemplate> >& vecEnergySumTempl) {
435  m_vecEnergySumTemplate = vecEnergySumTempl;
436 }
437 
439  const std::vector<std::vector<EnergySumZdcTemplate> >& vecEnergySumZdcTempl) {
440  m_vecEnergySumZdcTemplate = vecEnergySumZdcTempl;
441 }
442 
443 void TriggerMenu::setVecAXOL1TLTemplate(const std::vector<std::vector<AXOL1TLTemplate> >& vecAXOL1TLTempl) {
444  m_vecAXOL1TLTemplate = vecAXOL1TLTempl;
445 }
446 
447 void TriggerMenu::setVecCICADATemplate(const std::vector<std::vector<CICADATemplate> >& vecCICADATempl) {
448  m_vecCICADATemplate = vecCICADATempl;
449 }
450 
451 void TriggerMenu::setVecExternalTemplate(const std::vector<std::vector<ExternalTemplate> >& vecExternalTempl) {
452  m_vecExternalTemplate = vecExternalTempl;
453 }
454 
455 void TriggerMenu::setVecCorrelationTemplate(const std::vector<std::vector<CorrelationTemplate> >& vecCorrelationTempl) {
456  m_vecCorrelationTemplate = vecCorrelationTempl;
457 }
458 
460  const std::vector<std::vector<CorrelationThreeBodyTemplate> >& vecCorrelationThreeBodyTempl) {
461  m_vecCorrelationThreeBodyTemplate = vecCorrelationThreeBodyTempl;
462 }
463 
465  const std::vector<std::vector<CorrelationWithOverlapRemovalTemplate> >& vecCorrelationTempl) {
466  m_vecCorrelationWithOverlapRemovalTemplate = vecCorrelationTempl;
467 }
468 
469 // set the vectors containing the conditions for correlation templates
470 void TriggerMenu::setCorMuonTemplate(const std::vector<std::vector<MuonTemplate> >& corMuonTempl) {
471  m_corMuonTemplate = corMuonTempl;
472 }
473 
474 void TriggerMenu::setCorCaloTemplate(const std::vector<std::vector<CaloTemplate> >& corCaloTempl) {
475  m_corCaloTemplate = corCaloTempl;
476 }
477 
478 void TriggerMenu::setCorEnergySumTemplate(const std::vector<std::vector<EnergySumTemplate> >& corEnergySumTempl) {
479  m_corEnergySumTemplate = corEnergySumTempl;
480 }
481 
482 // set the algorithm map (by algorithm names)
484 
485 // set the algorithm map (by algorithm aliases)
487 
488 /*
489 // set the technical trigger map
490 void TriggerMenu::setGtTechnicalTriggerMap(const l1t::AlgorithmMap& ttMap) {
491  m_technicalTriggerMap = ttMap;
492 }
493 */
494 
495 // print the trigger menu (bit number, algorithm name, logical expression)
496 void TriggerMenu::print(std::ostream& myCout, int& printVerbosity) const {
497  // use another map <int, GlobalAlgorithm> to get the menu sorted after bit number
498  // both algorithm and bit numbers are unique
499  std::map<int, const GlobalAlgorithm*> algoBitToAlgo;
500  typedef std::map<int, const GlobalAlgorithm*>::const_iterator CItBit;
501 
502  for (l1t::CItAlgo itAlgo = m_algorithmMap.begin(); itAlgo != m_algorithmMap.end(); itAlgo++) {
503  int bitNumber = (itAlgo->second).algoBitNumber();
504  algoBitToAlgo[bitNumber] = &(itAlgo->second);
505  }
506 
507  size_t nrDefinedAlgo = algoBitToAlgo.size();
508 
509  /*
510  // idem for technical trigger map - only name and bit number are relevant for them
511  std::map<int, const GlobalAlgorithm*> ttBitToTt;
512 
513  for (l1t::CItAlgo itAlgo = m_technicalTriggerMap.begin(); itAlgo
514  != m_technicalTriggerMap.end(); itAlgo++) {
515 
516  int bitNumber = (itAlgo->second).algoBitNumber();
517  ttBitToTt[bitNumber] = &(itAlgo->second);
518  }
519 
520  size_t nrDefinedTechTrig = ttBitToTt.size();
521 */
522  //
523 
524  switch (printVerbosity) {
525  case 0: {
526  // header for printing algorithms
527 
528  myCout << "\n ********** L1 Trigger Menu - printing ********** \n"
529  << "\nL1 Trigger Menu Interface: " << m_triggerMenuInterface
530  << "\nL1 Trigger Menu Name: " << m_triggerMenuName << "\nL1 Trigger Menu UUID (hash): 0x"
531  << std::hex << m_triggerMenuUUID << std::dec << "\nL1 Trigger Menu Firmware (hash): 0x" << std::hex
532  << m_triggerMenuImplementation << std::dec << "\nAssociated Scale DB Key: " << m_scaleDbKey << "\n\n"
533  << "\nL1 Physics Algorithms: " << nrDefinedAlgo << " algorithms defined."
534  << "\n\n"
535  << "Bit Number " << std::right << std::setw(35) << "Algorithm Name"
536  << " " << std::right << std::setw(35) << "Algorithm Alias" << std::endl;
537 
538  for (CItBit itBit = algoBitToAlgo.begin(); itBit != algoBitToAlgo.end(); itBit++) {
539  int bitNumber = itBit->first;
540  std::string aName = (itBit->second)->algoName();
541  std::string aAlias = (itBit->second)->algoAlias();
542 
543  myCout << std::setw(6) << bitNumber << " " << std::right << std::setw(35) << aName << " " << std::right
544  << std::setw(35) << aAlias << std::endl;
545  }
546  /*
547  myCout
548  << "\nL1 Technical Triggers: " << nrDefinedTechTrig
549  << " technical triggers defined." << "\n\n" << std::endl;
550  if (nrDefinedTechTrig) {
551  myCout << "Bit Number " << " Technical trigger name " << std::endl;
552  }
553 
554  for (CItBit itBit = ttBitToTt.begin(); itBit != ttBitToTt.end(); itBit++) {
555 
556  int bitNumber = itBit->first;
557  std::string aName = (itBit->second)->algoName();
558  std::string aAlias = (itBit->second)->algoAlias();
559 
560  myCout << std::setw(6) << bitNumber << " "
561  << std::right << std::setw(35) << aName << " "
562  << std::right << std::setw(35) << aAlias
563  << std::endl;
564  }
565 */
566  } break;
567 
568  case 1: {
569  // header for printing algorithms
570 
571  myCout << "\n ********** L1 Trigger Menu - printing ********** \n"
572  << "\nL1 Trigger Menu Interface: " << m_triggerMenuInterface
573  << "\nL1 Trigger Menu Name: " << m_triggerMenuName << "\nL1 Trigger Menu UUID (hash): 0x"
574  << std::hex << m_triggerMenuUUID << std::dec << "\nL1 Trigger Menu Firmware (hash): 0x" << std::hex
575  << m_triggerMenuImplementation << std::dec << "\nAssociated Scale DB Key: " << m_scaleDbKey << "\n\n"
576  << "\nL1 Physics Algorithms: " << nrDefinedAlgo << " algorithms defined."
577  << "\n\n"
578  << "Bit Number " << std::right << std::setw(35) << "Algorithm Name"
579  << " " << std::right << std::setw(35) << "Algorithm Alias"
580  << "\n Logical Expression \n"
581  << std::endl;
582 
583  for (CItBit itBit = algoBitToAlgo.begin(); itBit != algoBitToAlgo.end(); itBit++) {
584  int bitNumber = itBit->first;
585  std::string aName = (itBit->second)->algoName();
586  std::string aAlias = (itBit->second)->algoAlias();
587  std::string aLogicalExpression = (itBit->second)->algoLogicalExpression();
588 
589  myCout << std::setw(6) << bitNumber << " " << std::right << std::setw(35) << aName << " " << std::right
590  << std::setw(35) << aAlias << "\n Logical expression: " << aLogicalExpression << "\n"
591  << std::endl;
592  }
593  /*
594  myCout
595  << "\nL1 Technical Triggers: " << nrDefinedTechTrig
596  << " technical triggers defined." << "\n\n" << std::endl;
597  if (nrDefinedTechTrig) {
598  myCout << "Bit Number " << " Technical trigger name " << std::endl;
599  }
600 
601  for (CItBit itBit = ttBitToTt.begin(); itBit != ttBitToTt.end(); itBit++) {
602 
603  int bitNumber = itBit->first;
604  std::string aName = (itBit->second)->algoName();
605 
606  myCout << std::setw(6) << bitNumber << " " << aName << std::endl;
607  }
608 */
609  } break;
610 
611  case 2: {
612  // header for printing algorithms
613 
614  myCout << "\n ********** L1 Trigger Menu - printing ********** \n"
615  << "\nL1 Trigger Menu Interface: " << m_triggerMenuInterface
616  << "\nL1 Trigger Menu Name: " << m_triggerMenuName << "\nL1 Trigger Menu UUID (hash): 0x"
617  << std::hex << m_triggerMenuUUID << std::dec << "\nL1 Trigger Menu Firmware (hash): 0x" << std::hex
618  << m_triggerMenuImplementation << std::dec << "\nAssociated Scale DB Key: " << m_scaleDbKey << "\n\n"
619  << "\nL1 Physics Algorithms: " << nrDefinedAlgo << " algorithms defined."
620  << "\n\n"
621  << std::endl;
622 
623  for (CItBit itBit = algoBitToAlgo.begin(); itBit != algoBitToAlgo.end(); itBit++) {
624  (itBit->second)->print(myCout);
625  }
626 
627  myCout << "\nNumber of condition chips: " << m_conditionMap.size() << "\n" << std::endl;
628 
629  int chipNr = -1;
630  int totalNrConditions = 0;
631 
632  for (std::vector<l1t::ConditionMap>::const_iterator itCondOnChip = m_conditionMap.begin();
633  itCondOnChip != m_conditionMap.end();
634  itCondOnChip++) {
635  chipNr++;
636 
637  int condMapSize = itCondOnChip->size();
638  totalNrConditions += condMapSize;
639 
640  myCout << "\nTotal number of conditions on condition chip " << chipNr << ": " << condMapSize << " conditions.\n"
641  << std::endl;
642 
643  for (l1t::CItCond itCond = itCondOnChip->begin(); itCond != itCondOnChip->end(); itCond++) {
644  (itCond->second)->print(myCout);
645  }
646  }
647 
648  myCout << "\nTotal number of conditions on all condition chips: " << totalNrConditions << "\n" << std::endl;
649  /*
650  myCout
651  << "\nL1 Technical Triggers: " << nrDefinedTechTrig
652  << " technical triggers defined." << "\n\n" << std::endl;
653  if (nrDefinedTechTrig) {
654  myCout << "Bit Number " << " Technical trigger name " << std::endl;
655  }
656 
657  for (CItBit itBit = ttBitToTt.begin(); itBit != ttBitToTt.end(); itBit++) {
658 
659  int bitNumber = itBit->first;
660  std::string aName = (itBit->second)->algoName();
661 
662  myCout << std::setw(6) << bitNumber << " " << aName << std::endl;
663  }
664 */
665 
666  } break;
667 
668  default: {
669  myCout << "\n ********** L1 Trigger Menu - printing ********** \n\n"
670  << "Verbosity level: " << printVerbosity << " not implemented.\n\n"
671  << std::endl;
672  } break;
673  }
674 }
675 
676 // get the result for algorithm with name algName
677 // use directly the format of decisionWord (no typedef)
678 const bool TriggerMenu::gtAlgorithmResult(const std::string& algName, const std::vector<bool>& decWord) const {
679  bool algResult = false;
680 
681  l1t::CItAlgo itAlgo = m_algorithmMap.find(algName);
682  if (itAlgo != m_algorithmMap.end()) {
683  int bitNumber = (itAlgo->second).algoBitNumber();
684  algResult = decWord.at(bitNumber);
685  return algResult;
686  }
687 
688  // return false if the algorithm name is not found in the menu
689  // TODO throw exception or LogInfo would be better - but the class is used in
690  // XDAQ Trigger Supervisor (outside CMSSW) hence no CMSSW dependence
691  // is allowed here...
692 
693  return false;
694 }
std::string m_triggerMenuName
Definition: TriggerMenu.h:243
void setCorCaloTemplate(const std::vector< std::vector< CaloTemplate > > &)
Definition: TriggerMenu.cc:474
void setVecExternalTemplate(const std::vector< std::vector< ExternalTemplate > > &)
Definition: TriggerMenu.cc:451
void setCorMuonTemplate(const std::vector< std::vector< MuonTemplate > > &)
Definition: TriggerMenu.cc:470
std::vector< std::vector< CICADATemplate > > m_vecCICADATemplate
Definition: TriggerMenu.h:259
void setGtAlgorithmMap(const l1t::AlgorithmMap &)
Definition: TriggerMenu.cc:483
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:443
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:459
void setGtScaleDbKey(const std::string &)
Definition: TriggerMenu.cc:420
void setGtScales(const l1t::GlobalScales &)
Definition: TriggerMenu.cc:423
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:434
l1t::AlgorithmMap m_algorithmMap
map containing the physics algorithms (by name)
Definition: TriggerMenu.h:271
void setGtTriggerMenuUUID(const unsigned long uuid)
Definition: TriggerMenu.cc:417
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:426
void setCorEnergySumTemplate(const std::vector< std::vector< EnergySumTemplate > > &)
Definition: TriggerMenu.cc:478
void setGtConditionMap(const std::vector< l1t::ConditionMap > &)
Definition: TriggerMenu.cc:174
void setVecEnergySumZdcTemplate(const std::vector< std::vector< EnergySumZdcTemplate > > &)
Definition: TriggerMenu.cc:438
void setVecCorrelationWithOverlapRemovalTemplate(const std::vector< std::vector< CorrelationWithOverlapRemovalTemplate > > &)
Definition: TriggerMenu.cc:464
void setGtTriggerMenuName(const std::string &)
Definition: TriggerMenu.cc:411
void setGtTriggerMenuImplementation(const unsigned long)
Definition: TriggerMenu.cc:413
const bool gtAlgorithmResult(const std::string &algName, const std::vector< bool > &decWord) const
Definition: TriggerMenu.cc:678
unsigned long m_triggerMenuUUID
Definition: TriggerMenu.h:246
void setVecCICADATemplate(const std::vector< std::vector< CICADATemplate > > &)
Definition: TriggerMenu.cc:447
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:455
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:486
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:430
void setGtTriggerMenuInterface(const std::string &)
Definition: TriggerMenu.cc:407
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:496
std::vector< std::vector< CorrelationTemplate > > m_vecCorrelationTemplate
Definition: TriggerMenu.h:263
std::vector< std::vector< CaloTemplate > > m_vecCaloTemplate
Definition: TriggerMenu.h:255