32 : m_triggerMenuInterface(
"NULL"),
33 m_triggerMenuName(
"NULL"),
34 m_triggerMenuImplementation(
"NULL"),
35 m_scaleDbKey(
"NULL") {
40 const unsigned int numberConditionChips,
41 const std::vector<std::vector<L1GtMuonTemplate> >& vecMuonTemplateVal,
42 const std::vector<std::vector<L1GtCaloTemplate> >& vecCaloTemplateVal,
43 const std::vector<std::vector<L1GtEnergySumTemplate> >& vecEnergySumTemplateVal,
44 const std::vector<std::vector<L1GtJetCountsTemplate> >& vecJetCountsTemplateVal,
45 const std::vector<std::vector<L1GtCastorTemplate> >& vecCastorTemplateVal,
46 const std::vector<std::vector<L1GtHfBitCountsTemplate> >& vecHfBitCountsTemplateVal,
47 const std::vector<std::vector<L1GtHfRingEtSumsTemplate> >& vecHfRingEtSumsTemplateVal,
48 const std::vector<std::vector<L1GtBptxTemplate> >& vecBptxTemplateVal,
49 const std::vector<std::vector<L1GtExternalTemplate> >& vecExternalTemplateVal,
50 const std::vector<std::vector<L1GtCorrelationTemplate> >& vecCorrelationTemplateVal,
51 const std::vector<std::vector<L1GtMuonTemplate> >& corMuonTemplateVal,
52 const std::vector<std::vector<L1GtCaloTemplate> >& corCaloTemplateVal,
53 const std::vector<std::vector<L1GtEnergySumTemplate> >& corEnergySumTemplateVal
56 : m_triggerMenuInterface(
"NULL"),
57 m_triggerMenuName(triggerMenuNameVal),
58 m_triggerMenuImplementation(
"NULL"),
60 m_vecMuonTemplate(vecMuonTemplateVal),
61 m_vecCaloTemplate(vecCaloTemplateVal),
62 m_vecEnergySumTemplate(vecEnergySumTemplateVal),
63 m_vecJetCountsTemplate(vecJetCountsTemplateVal),
64 m_vecCastorTemplate(vecCastorTemplateVal),
65 m_vecHfBitCountsTemplate(vecHfBitCountsTemplateVal),
66 m_vecHfRingEtSumsTemplate(vecHfRingEtSumsTemplateVal),
67 m_vecBptxTemplate(vecBptxTemplateVal),
68 m_vecExternalTemplate(vecExternalTemplateVal),
69 m_vecCorrelationTemplate(vecCorrelationTemplateVal),
70 m_corMuonTemplate(corMuonTemplateVal),
71 m_corCaloTemplate(corCaloTemplateVal),
72 m_corEnergySumTemplate(corEnergySumTemplateVal) {
103 (*this).buildGtConditionMap();
119 itCondOnChip->clear();
157 (*this).buildGtConditionMap();
171 itCondOnChip->clear();
180 if (condMapSize < vecMuonSize) {
187 for (std::vector<std::vector<L1GtMuonTemplate> >::iterator itCondOnChip =
m_vecMuonTemplate.begin();
192 for (std::vector<L1GtMuonTemplate>::iterator itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
200 if (condMapSize < vecCaloSize) {
206 for (std::vector<std::vector<L1GtCaloTemplate> >::iterator itCondOnChip =
m_vecCaloTemplate.begin();
211 for (std::vector<L1GtCaloTemplate>::iterator itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
219 if (condMapSize < vecEnergySumSize) {
225 for (std::vector<std::vector<L1GtEnergySumTemplate> >::iterator itCondOnChip =
m_vecEnergySumTemplate.begin();
230 for (std::vector<L1GtEnergySumTemplate>::iterator itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
238 if (condMapSize < vecJetCountsSize) {
244 for (std::vector<std::vector<L1GtJetCountsTemplate> >::iterator itCondOnChip =
m_vecJetCountsTemplate.begin();
249 for (std::vector<L1GtJetCountsTemplate>::iterator itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
257 if (condMapSize < vecCastorSize) {
263 for (std::vector<std::vector<L1GtCastorTemplate> >::iterator itCondOnChip =
m_vecCastorTemplate.begin();
268 for (std::vector<L1GtCastorTemplate>::iterator itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
276 if (condMapSize < vecHfBitCountsSize) {
287 for (std::vector<L1GtHfBitCountsTemplate>::iterator itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
295 if (condMapSize < vecHfRingEtSumsSize) {
306 for (std::vector<L1GtHfRingEtSumsTemplate>::iterator itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
314 if (condMapSize < vecBptxSize) {
320 for (std::vector<std::vector<L1GtBptxTemplate> >::iterator itCondOnChip =
m_vecBptxTemplate.begin();
325 for (std::vector<L1GtBptxTemplate>::iterator itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
333 if (condMapSize < vecExternalSize) {
339 for (std::vector<std::vector<L1GtExternalTemplate> >::iterator itCondOnChip =
m_vecExternalTemplate.begin();
344 for (std::vector<L1GtExternalTemplate>::iterator itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
352 if (condMapSize < vecCorrelationSize) {
363 for (std::vector<L1GtCorrelationTemplate>::iterator itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
394 const std::vector<std::vector<L1GtEnergySumTemplate> >& vecEnergySumTempl) {
399 const std::vector<std::vector<L1GtJetCountsTemplate> >& vecJetCountsTempl) {
408 const std::vector<std::vector<L1GtHfBitCountsTemplate> >& vecHfBitCountsTempl) {
413 const std::vector<std::vector<L1GtHfRingEtSumsTemplate> >& vecHfRingEtSumsTempl) {
426 const std::vector<std::vector<L1GtCorrelationTemplate> >& vecCorrelationTempl) {
440 const std::vector<std::vector<L1GtEnergySumTemplate> >& corEnergySumTempl) {
457 std::map<int, const L1GtAlgorithm*> algoBitToAlgo;
458 typedef std::map<int, const L1GtAlgorithm*>::const_iterator CItBit;
461 int bitNumber = (itAlgo->second).algoBitNumber();
462 algoBitToAlgo[
bitNumber] = &(itAlgo->second);
465 size_t nrDefinedAlgo = algoBitToAlgo.size();
468 std::map<int, const L1GtAlgorithm*> ttBitToTt;
471 int bitNumber = (itAlgo->second).algoBitNumber();
472 ttBitToTt[
bitNumber] = &(itAlgo->second);
475 size_t nrDefinedTechTrig = ttBitToTt.size();
479 switch (printVerbosity) {
483 myCout <<
"\n ********** L1 Trigger Menu - printing ********** \n"
487 <<
"\nAssociated Scale DB Key: " <<
m_scaleDbKey <<
"\n\n"
488 <<
"\nL1 Physics Algorithms: " << nrDefinedAlgo <<
" algorithms defined."
490 <<
"Bit Number " << std::right << std::setw(35) <<
"Algorithm Name"
491 <<
" " << std::right << std::setw(35) <<
"Algorithm Alias" << std::endl;
493 for (CItBit itBit = algoBitToAlgo.begin(); itBit != algoBitToAlgo.end(); itBit++) {
498 myCout << std::setw(6) <<
bitNumber <<
" " << std::right << std::setw(35) << aName <<
" " << std::right
499 << std::setw(35) << aAlias << std::endl;
502 myCout <<
"\nL1 Technical Triggers: " << nrDefinedTechTrig <<
" technical triggers defined."
505 if (nrDefinedTechTrig) {
506 myCout <<
"Bit Number "
507 <<
" Technical trigger name " << std::endl;
510 for (CItBit itBit = ttBitToTt.begin(); itBit != ttBitToTt.end(); itBit++) {
515 myCout << std::setw(6) <<
bitNumber <<
" " << std::right << std::setw(35) << aName <<
" " << std::right
516 << std::setw(35) << aAlias << std::endl;
524 myCout <<
"\n ********** L1 Trigger Menu - printing ********** \n"
528 <<
"\nAssociated Scale DB Key: " <<
m_scaleDbKey <<
"\n\n"
529 <<
"\nL1 Physics Algorithms: " << nrDefinedAlgo <<
" algorithms defined."
531 <<
"Bit Number " << std::right << std::setw(35) <<
"Algorithm Name"
532 <<
" " << std::right << std::setw(35) <<
"Algorithm Alias"
533 <<
"\n Logical Expression \n"
536 for (CItBit itBit = algoBitToAlgo.begin(); itBit != algoBitToAlgo.end(); itBit++) {
540 std::string aLogicalExpression = (itBit->second)->algoLogicalExpression();
542 myCout << std::setw(6) <<
bitNumber <<
" " << std::right << std::setw(35) << aName <<
" " << std::right
543 << std::setw(35) << aAlias <<
"\n Logical expression: " << aLogicalExpression <<
"\n"
547 myCout <<
"\nL1 Technical Triggers: " << nrDefinedTechTrig <<
" technical triggers defined."
550 if (nrDefinedTechTrig) {
551 myCout <<
"Bit Number "
552 <<
" Technical trigger name " << std::endl;
555 for (CItBit itBit = ttBitToTt.begin(); itBit != ttBitToTt.end(); itBit++) {
559 myCout << std::setw(6) <<
bitNumber <<
" " << aName << std::endl;
566 myCout <<
"\n ********** L1 Trigger Menu - printing ********** \n"
570 <<
"\nAssociated Scale DB Key: " <<
m_scaleDbKey <<
"\n\n"
571 <<
"\nL1 Physics Algorithms: " << nrDefinedAlgo <<
" algorithms defined."
575 for (CItBit itBit = algoBitToAlgo.begin(); itBit != algoBitToAlgo.end(); itBit++) {
576 (itBit->second)->
print(myCout);
579 myCout <<
"\nNumber of condition chips: " <<
m_conditionMap.size() <<
"\n" << std::endl;
582 int totalNrConditions = 0;
584 for (std::vector<ConditionMap>::const_iterator itCondOnChip =
m_conditionMap.begin();
589 int condMapSize = itCondOnChip->size();
590 totalNrConditions += condMapSize;
592 myCout <<
"\nTotal number of conditions on condition chip " << chipNr <<
": " << condMapSize <<
" conditions.\n"
595 for (
CItCond itCond = itCondOnChip->begin(); itCond != itCondOnChip->end(); itCond++) {
596 (itCond->second)->
print(myCout);
600 myCout <<
"\nTotal number of conditions on all condition chips: " << totalNrConditions <<
"\n" << std::endl;
602 myCout <<
"\nL1 Technical Triggers: " << nrDefinedTechTrig <<
" technical triggers defined."
605 if (nrDefinedTechTrig) {
606 myCout <<
"Bit Number "
607 <<
" Technical trigger name " << std::endl;
610 for (CItBit itBit = ttBitToTt.begin(); itBit != ttBitToTt.end(); itBit++) {
614 myCout << std::setw(6) <<
bitNumber <<
" " << aName << std::endl;
620 myCout <<
"\n ********** L1 Trigger Menu - printing ********** \n\n"
621 <<
"Verbosity level: " << printVerbosity <<
" not implemented.\n\n"
630 bool algResult =
false;
634 int bitNumber = (itAlgo->second).algoBitNumber();