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<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)
78 m_conditionMap.resize(numberConditionChips);
110 m_conditionMap.resize(rhs.m_conditionMap.size());
111 (*this).buildGtConditionMap();
128 for (std::vector<ConditionMap>::iterator
129 itCondOnChip = m_conditionMap.begin(); itCondOnChip != m_conditionMap.end(); itCondOnChip++) {
131 itCondOnChip->clear();
142 if (
this != &rhs ) {
172 m_conditionMap.resize(rhs.m_conditionMap.size());
173 (*this).buildGtConditionMap();
182 m_conditionMap = condMap;
189 for (std::vector<ConditionMap>::iterator itCondOnChip =
190 m_conditionMap.begin(); itCondOnChip != m_conditionMap.end(); itCondOnChip++) {
192 itCondOnChip->clear();
198 size_t condMapSize = m_conditionMap.size();
202 if (condMapSize < vecMuonSize) {
203 m_conditionMap.resize(vecMuonSize);
204 condMapSize = m_conditionMap.size();
209 for (std::vector<std::vector<L1GtMuonTemplate> >::iterator
216 for (std::vector<L1GtMuonTemplate>::iterator
217 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
220 (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
226 if (condMapSize < vecCaloSize) {
227 m_conditionMap.resize(vecCaloSize);
228 condMapSize = m_conditionMap.size();
232 for (std::vector<std::vector<L1GtCaloTemplate> >::iterator
239 for (std::vector<L1GtCaloTemplate>::iterator
240 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
243 (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
249 if (condMapSize < vecEnergySumSize) {
250 m_conditionMap.resize(vecEnergySumSize);
251 condMapSize = m_conditionMap.size();
255 for (std::vector<std::vector<L1GtEnergySumTemplate> >::iterator
262 for (std::vector<L1GtEnergySumTemplate>::iterator
263 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
266 (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
272 if (condMapSize < vecJetCountsSize) {
273 m_conditionMap.resize(vecJetCountsSize);
274 condMapSize = m_conditionMap.size();
278 for (std::vector<std::vector<L1GtJetCountsTemplate> >::iterator
285 for (std::vector<L1GtJetCountsTemplate>::iterator
286 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
289 (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
296 if (condMapSize < vecCastorSize) {
297 m_conditionMap.resize(vecCastorSize);
298 condMapSize = m_conditionMap.size();
302 for (std::vector<std::vector<L1GtCastorTemplate> >::iterator
309 for (std::vector<L1GtCastorTemplate>::iterator
310 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
313 (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
319 if (condMapSize < vecHfBitCountsSize) {
320 m_conditionMap.resize(vecHfBitCountsSize);
321 condMapSize = m_conditionMap.size();
325 for (std::vector<std::vector<L1GtHfBitCountsTemplate> >::iterator
332 for (std::vector<L1GtHfBitCountsTemplate>::iterator
333 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
336 (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
342 if (condMapSize < vecHfRingEtSumsSize) {
343 m_conditionMap.resize(vecHfRingEtSumsSize);
344 condMapSize = m_conditionMap.size();
348 for (std::vector<std::vector<L1GtHfRingEtSumsTemplate> >::iterator
355 for (std::vector<L1GtHfRingEtSumsTemplate>::iterator
356 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
359 (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
365 if (condMapSize < vecBptxSize) {
366 m_conditionMap.resize(vecBptxSize);
367 condMapSize = m_conditionMap.size();
371 for (std::vector<std::vector<L1GtBptxTemplate> >::iterator
378 for (std::vector<L1GtBptxTemplate>::iterator
379 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
382 (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
388 if (condMapSize < vecExternalSize) {
389 m_conditionMap.resize(vecExternalSize);
390 condMapSize = m_conditionMap.size();
394 for (std::vector<std::vector<L1GtExternalTemplate> >::iterator
401 for (std::vector<L1GtExternalTemplate>::iterator
402 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
405 (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
411 if (condMapSize < vecCorrelationSize) {
412 m_conditionMap.resize(vecCorrelationSize);
413 condMapSize = m_conditionMap.size();
417 for (std::vector<std::vector<L1GtCorrelationTemplate> >::iterator
424 for (std::vector<L1GtCorrelationTemplate>::iterator
425 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
428 (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
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;
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;
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;
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;
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
704 itCondOnChip = m_conditionMap.begin();
705 itCondOnChip != m_conditionMap.end(); itCondOnChip++) {
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;
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);