33 : m_triggerMenuInterface(
"NULL" ),
34 m_triggerMenuName(
"NULL" ),
35 m_triggerMenuImplementation(
"NULL" ),
36 m_scaleDbKey(
"NULL" )
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
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)
111 (*this).buildGtConditionMap();
128 for (std::vector<l1t::ConditionMap>::iterator
131 itCondOnChip->clear();
142 if (
this != &rhs ) {
173 (*this).buildGtConditionMap();
189 for (std::vector<l1t::ConditionMap>::iterator itCondOnChip =
192 itCondOnChip->clear();
202 if (condMapSize < vecMuonSize) {
209 for (std::vector<std::vector<MuonTemplate> >::iterator
216 for (std::vector<MuonTemplate>::iterator
217 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
226 if (condMapSize < vecCaloSize) {
232 for (std::vector<std::vector<CaloTemplate> >::iterator
239 for (std::vector<CaloTemplate>::iterator
240 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
250 if (condMapSize < vecEnergySumSize) {
256 for (std::vector<std::vector<EnergySumTemplate> >::iterator
263 for (std::vector<EnergySumTemplate>::iterator
264 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
414 if (condMapSize < vecCorrelationSize) {
420 for (std::vector<std::vector<CorrelationTemplate> >::iterator
427 for (std::vector<CorrelationTemplate>::iterator
428 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
460 const std::vector<std::vector<MuonTemplate> >& vecMuonTempl) {
466 const std::vector<std::vector<CaloTemplate> >& vecCaloTempl) {
472 const std::vector<std::vector<EnergySumTemplate> >& vecEnergySumTempl) {
478 const std::vector<std::vector<L1GtJetCountsTemplate> >& vecJetCountsTempl) {
484 const std::vector<std::vector<L1GtCastorTemplate> >& vecCastorTempl) {
490 const std::vector<std::vector<L1GtHfBitCountsTemplate> >& vecHfBitCountsTempl) {
496 const std::vector<std::vector<L1GtHfRingEtSumsTemplate> >& vecHfRingEtSumsTempl) {
502 const std::vector<std::vector<L1GtBptxTemplate> >& vecBptxTempl) {
508 const std::vector<std::vector<L1GtExternalTemplate> >& vecExternalTempl) {
514 const std::vector<std::vector<CorrelationTemplate> >& vecCorrelationTempl) {
521 const std::vector<std::vector<MuonTemplate> >& corMuonTempl) {
527 const std::vector<std::vector<CaloTemplate> >& corCaloTempl) {
533 const std::vector<std::vector<EnergySumTemplate> >& corEnergySumTempl) {
560 std::map<int, const L1GtAlgorithm*> algoBitToAlgo;
561 typedef std::map<int, const L1GtAlgorithm*>::const_iterator CItBit;
565 int bitNumber = (itAlgo->second).algoBitNumber();
566 algoBitToAlgo[bitNumber] = &(itAlgo->second);
569 size_t nrDefinedAlgo = algoBitToAlgo.size();
572 std::map<int, const L1GtAlgorithm*> ttBitToTt;
577 int bitNumber = (itAlgo->second).algoBitNumber();
578 ttBitToTt[bitNumber] = &(itAlgo->second);
581 size_t nrDefinedTechTrig = ttBitToTt.size();
585 switch (printVerbosity) {
591 myCout <<
"\n ********** L1 Trigger Menu - printing ********** \n"
595 <<
"\nAssociated Scale DB Key: " <<
m_scaleDbKey <<
"\n\n"
596 <<
"\nL1 Physics Algorithms: " << nrDefinedAlgo <<
" algorithms defined." <<
"\n\n"
598 << std::right << std::setw(35) <<
"Algorithm Name" <<
" "
599 << std::right << std::setw(35) <<
"Algorithm Alias"
602 for (CItBit itBit = algoBitToAlgo.begin(); itBit != algoBitToAlgo.end(); itBit++) {
604 int bitNumber = itBit->first;
608 myCout << std::setw(6) << bitNumber <<
" "
609 << std::right << std::setw(35) << aName <<
" "
610 << std::right << std::setw(35) << aAlias
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;
621 for (CItBit itBit = ttBitToTt.begin(); itBit != ttBitToTt.end(); itBit++) {
623 int bitNumber = itBit->first;
627 myCout << std::setw(6) << bitNumber <<
" "
628 << std::right << std::setw(35) << aName <<
" "
629 << std::right << std::setw(35) << aAlias
640 myCout <<
"\n ********** L1 Trigger Menu - printing ********** \n"
644 <<
"\nAssociated Scale DB Key: " <<
m_scaleDbKey <<
"\n\n"
645 <<
"\nL1 Physics Algorithms: " << nrDefinedAlgo <<
" algorithms defined." <<
"\n\n"
647 << std::right << std::setw(35) <<
"Algorithm Name" <<
" "
648 << std::right << std::setw(35) <<
"Algorithm Alias"
649 <<
"\n Logical Expression \n"
652 for (CItBit itBit = algoBitToAlgo.begin(); itBit != algoBitToAlgo.end(); itBit++) {
654 int bitNumber = itBit->first;
657 std::string aLogicalExpression = (itBit->second)->algoLogicalExpression();
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"
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;
673 for (CItBit itBit = ttBitToTt.begin(); itBit != ttBitToTt.end(); itBit++) {
675 int bitNumber = itBit->first;
678 myCout << std::setw(6) << bitNumber <<
" " << aName << std::endl;
687 myCout <<
"\n ********** L1 Trigger Menu - printing ********** \n"
691 <<
"\nAssociated Scale DB Key: " <<
m_scaleDbKey <<
"\n\n"
692 <<
"\nL1 Physics Algorithms: " << nrDefinedAlgo <<
" algorithms defined." <<
"\n\n"
695 for (CItBit itBit = algoBitToAlgo.begin(); itBit != algoBitToAlgo.end(); itBit++) {
696 (itBit->second)->
print(myCout);
700 myCout <<
"\nNumber of condition chips: " <<
m_conditionMap.size() <<
"\n"
704 int totalNrConditions = 0;
706 for (std::vector<l1t::ConditionMap>::const_iterator
712 int condMapSize = itCondOnChip->size();
713 totalNrConditions += condMapSize;
715 myCout <<
"\nTotal number of conditions on condition chip " << chipNr
716 <<
": " << condMapSize
717 <<
" conditions.\n" << std::endl;
719 for (
l1t::CItCond itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
722 (itCond->second)->
print(myCout);
728 myCout <<
"\nTotal number of conditions on all condition chips: "
729 << totalNrConditions <<
"\n"
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;
739 for (CItBit itBit = ttBitToTt.begin(); itBit != ttBitToTt.end(); itBit++) {
741 int bitNumber = itBit->first;
744 myCout << std::setw(6) << bitNumber <<
" " << aName << std::endl;
752 myCout <<
"\n ********** L1 Trigger Menu - printing ********** \n\n"
753 <<
"Verbosity level: " << printVerbosity <<
" not implemented.\n\n"
764 const std::vector<bool>& decWord)
const {
766 bool algResult =
false;
770 int bitNumber = (itAlgo->second).algoBitNumber();
771 algResult = decWord.at(bitNumber);
ConditionMap::const_iterator CItCond
iterators through map containing the conditions
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
std::map< std::string, L1GtAlgorithm > AlgorithmMap
map containing the algorithms