33 : m_triggerMenuInterface(
"NULL" ),
34 m_triggerMenuName(
"NULL" ),
35 m_triggerMenuImplementation(
"NULL" ),
36 m_scaleDbKey(
"NULL" )
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
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<ConditionMap>::iterator
131 itCondOnChip->clear();
142 if (
this != &rhs ) {
173 (*this).buildGtConditionMap();
189 for (std::vector<ConditionMap>::iterator itCondOnChip =
192 itCondOnChip->clear();
202 if (condMapSize < vecMuonSize) {
209 for (std::vector<std::vector<L1GtMuonTemplate> >::iterator
216 for (std::vector<L1GtMuonTemplate>::iterator
217 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
226 if (condMapSize < vecCaloSize) {
232 for (std::vector<std::vector<L1GtCaloTemplate> >::iterator
239 for (std::vector<L1GtCaloTemplate>::iterator
240 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
249 if (condMapSize < vecEnergySumSize) {
255 for (std::vector<std::vector<L1GtEnergySumTemplate> >::iterator
262 for (std::vector<L1GtEnergySumTemplate>::iterator
263 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
272 if (condMapSize < vecJetCountsSize) {
278 for (std::vector<std::vector<L1GtJetCountsTemplate> >::iterator
285 for (std::vector<L1GtJetCountsTemplate>::iterator
286 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
296 if (condMapSize < vecCastorSize) {
302 for (std::vector<std::vector<L1GtCastorTemplate> >::iterator
309 for (std::vector<L1GtCastorTemplate>::iterator
310 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
319 if (condMapSize < vecHfBitCountsSize) {
325 for (std::vector<std::vector<L1GtHfBitCountsTemplate> >::iterator
332 for (std::vector<L1GtHfBitCountsTemplate>::iterator
333 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
342 if (condMapSize < vecHfRingEtSumsSize) {
348 for (std::vector<std::vector<L1GtHfRingEtSumsTemplate> >::iterator
355 for (std::vector<L1GtHfRingEtSumsTemplate>::iterator
356 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
365 if (condMapSize < vecBptxSize) {
371 for (std::vector<std::vector<L1GtBptxTemplate> >::iterator
378 for (std::vector<L1GtBptxTemplate>::iterator
379 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
388 if (condMapSize < vecExternalSize) {
394 for (std::vector<std::vector<L1GtExternalTemplate> >::iterator
401 for (std::vector<L1GtExternalTemplate>::iterator
402 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
411 if (condMapSize < vecCorrelationSize) {
417 for (std::vector<std::vector<L1GtCorrelationTemplate> >::iterator
424 for (std::vector<L1GtCorrelationTemplate>::iterator
425 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
457 const std::vector<std::vector<L1GtMuonTemplate> >& vecMuonTempl) {
463 const std::vector<std::vector<L1GtCaloTemplate> >& vecCaloTempl) {
469 const std::vector<std::vector<L1GtEnergySumTemplate> >& vecEnergySumTempl) {
475 const std::vector<std::vector<L1GtJetCountsTemplate> >& vecJetCountsTempl) {
481 const std::vector<std::vector<L1GtCastorTemplate> >& vecCastorTempl) {
487 const std::vector<std::vector<L1GtHfBitCountsTemplate> >& vecHfBitCountsTempl) {
493 const std::vector<std::vector<L1GtHfRingEtSumsTemplate> >& vecHfRingEtSumsTempl) {
499 const std::vector<std::vector<L1GtBptxTemplate> >& vecBptxTempl) {
505 const std::vector<std::vector<L1GtExternalTemplate> >& vecExternalTempl) {
511 const std::vector<std::vector<L1GtCorrelationTemplate> >& vecCorrelationTempl) {
518 const std::vector<std::vector<L1GtMuonTemplate> >& corMuonTempl) {
524 const std::vector<std::vector<L1GtCaloTemplate> >& corCaloTempl) {
530 const std::vector<std::vector<L1GtEnergySumTemplate> >& corEnergySumTempl) {
557 std::map<int, const L1GtAlgorithm*> algoBitToAlgo;
558 typedef std::map<int, const L1GtAlgorithm*>::const_iterator CItBit;
562 int bitNumber = (itAlgo->second).algoBitNumber();
563 algoBitToAlgo[bitNumber] = &(itAlgo->second);
566 size_t nrDefinedAlgo = algoBitToAlgo.size();
569 std::map<int, const L1GtAlgorithm*> ttBitToTt;
574 int bitNumber = (itAlgo->second).algoBitNumber();
575 ttBitToTt[bitNumber] = &(itAlgo->second);
578 size_t nrDefinedTechTrig = ttBitToTt.size();
582 switch (printVerbosity) {
588 myCout <<
"\n ********** L1 Trigger Menu - printing ********** \n"
592 <<
"\nAssociated Scale DB Key: " <<
m_scaleDbKey <<
"\n\n"
593 <<
"\nL1 Physics Algorithms: " << nrDefinedAlgo <<
" algorithms defined." <<
"\n\n"
595 << std::right << std::setw(35) <<
"Algorithm Name" <<
" "
596 << std::right << std::setw(35) <<
"Algorithm Alias"
599 for (CItBit itBit = algoBitToAlgo.begin(); itBit != algoBitToAlgo.end(); itBit++) {
601 int bitNumber = itBit->first;
602 std::string aName = (itBit->second)->algoName();
603 std::string aAlias = (itBit->second)->algoAlias();
605 myCout << std::setw(6) << bitNumber <<
" "
606 << std::right << std::setw(35) << aName <<
" "
607 << std::right << std::setw(35) << aAlias
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;
618 for (CItBit itBit = ttBitToTt.begin(); itBit != ttBitToTt.end(); itBit++) {
620 int bitNumber = itBit->first;
621 std::string aName = (itBit->second)->algoName();
622 std::string aAlias = (itBit->second)->algoAlias();
624 myCout << std::setw(6) << bitNumber <<
" "
625 << std::right << std::setw(35) << aName <<
" "
626 << std::right << std::setw(35) << aAlias
637 myCout <<
"\n ********** L1 Trigger Menu - printing ********** \n"
641 <<
"\nAssociated Scale DB Key: " <<
m_scaleDbKey <<
"\n\n"
642 <<
"\nL1 Physics Algorithms: " << nrDefinedAlgo <<
" algorithms defined." <<
"\n\n"
644 << std::right << std::setw(35) <<
"Algorithm Name" <<
" "
645 << std::right << std::setw(35) <<
"Algorithm Alias"
646 <<
"\n Logical Expression \n"
649 for (CItBit itBit = algoBitToAlgo.begin(); itBit != algoBitToAlgo.end(); itBit++) {
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();
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"
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;
670 for (CItBit itBit = ttBitToTt.begin(); itBit != ttBitToTt.end(); itBit++) {
672 int bitNumber = itBit->first;
673 std::string aName = (itBit->second)->algoName();
675 myCout << std::setw(6) << bitNumber <<
" " << aName << std::endl;
684 myCout <<
"\n ********** L1 Trigger Menu - printing ********** \n"
688 <<
"\nAssociated Scale DB Key: " <<
m_scaleDbKey <<
"\n\n"
689 <<
"\nL1 Physics Algorithms: " << nrDefinedAlgo <<
" algorithms defined." <<
"\n\n"
692 for (CItBit itBit = algoBitToAlgo.begin(); itBit != algoBitToAlgo.end(); itBit++) {
693 (itBit->second)->
print(myCout);
697 myCout <<
"\nNumber of condition chips: " <<
m_conditionMap.size() <<
"\n"
701 int totalNrConditions = 0;
703 for (std::vector<ConditionMap>::const_iterator
709 int condMapSize = itCondOnChip->size();
710 totalNrConditions += condMapSize;
712 myCout <<
"\nTotal number of conditions on condition chip " << chipNr
713 <<
": " << condMapSize
714 <<
" conditions.\n" << std::endl;
716 for (
CItCond itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
719 (itCond->second)->
print(myCout);
725 myCout <<
"\nTotal number of conditions on all condition chips: "
726 << totalNrConditions <<
"\n"
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;
736 for (CItBit itBit = ttBitToTt.begin(); itBit != ttBitToTt.end(); itBit++) {
738 int bitNumber = itBit->first;
739 std::string aName = (itBit->second)->algoName();
741 myCout << std::setw(6) << bitNumber <<
" " << aName << std::endl;
749 myCout <<
"\n ********** L1 Trigger Menu - printing ********** \n\n"
750 <<
"Verbosity level: " << printVerbosity <<
" not implemented.\n\n"
761 const std::vector<bool>& decWord)
const {
763 bool algResult =
false;
767 int bitNumber = (itAlgo->second).algoBitNumber();
768 algResult = decWord.at(bitNumber);