Skip to content

Commit

Permalink
Merge pull request #31256 from perrotta/reduceWarninLinesPerEvent
Browse files Browse the repository at this point in the history
Warn about bit number above trigger collections sizes only once per event/bx
  • Loading branch information
cmsbuild authored Sep 8, 2020
2 parents 8a44670 + 0445ac2 commit 56e25f2
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions L1Trigger/L1TGlobal/src/GlobalBoard.cc
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,7 @@ void l1t::GlobalBoard::runFDL(edm::Event& iEvent,
int inBxInEvent = totalBxInEvent / 2 + iBxInEvent;

bool temp_algPrescaledOr = false;
bool alreadyReported = false;
for (unsigned int iBit = 0; iBit < numberPhysTriggers; ++iBit) {
bool bitValue = m_uGtAlgBlk.getAlgoDecisionInitial(iBit);
if (bitValue) {
Expand All @@ -895,8 +896,10 @@ void l1t::GlobalBoard::runFDL(edm::Event& iEvent,
temp_algPrescaledOr = true;
}
} // require bit in range
else {
edm::LogWarning("L1TGlobal") << "\nWarning: algoBit >= prescaleFactorsAlgoTrig.size() " << std::endl;
else if (!alreadyReported) {
alreadyReported = true;
edm::LogWarning("L1TGlobal") << "\nWarning: algoBit >= prescaleFactorsAlgoTrig.size() in bx " << iBxInEvent
<< std::endl;
}
} //if algo bit is set true
} //loop over alg bits
Expand All @@ -915,6 +918,7 @@ void l1t::GlobalBoard::runFDL(edm::Event& iEvent,

if (!algorithmTriggersUnmasked) {
bool temp_algFinalOr = false;
bool alreadyReported = false;
for (unsigned int iBit = 0; iBit < numberPhysTriggers; ++iBit) {
bool bitValue = m_uGtAlgBlk.getAlgoDecisionInterm(iBit);

Expand All @@ -923,8 +927,10 @@ void l1t::GlobalBoard::runFDL(edm::Event& iEvent,
bool isMasked = false;
if (iBit < triggerMaskAlgoTrig.size())
isMasked = (triggerMaskAlgoTrig.at(iBit) == 0);
else {
edm::LogWarning("L1TGlobal") << "\nWarning: algoBit >= triggerMaskAlgoTrig.size() " << std::endl;
else if (!alreadyReported) {
alreadyReported = true;
edm::LogWarning("L1TGlobal") << "\nWarning: algoBit >= triggerMaskAlgoTrig.size() in bx " << iBxInEvent
<< std::endl;
}

bool passMask = (bitValue && !isMasked);
Expand Down

0 comments on commit 56e25f2

Please sign in to comment.