Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn about bit number above trigger collections sizes only once per event/bx #31256

Merged
merged 3 commits into from
Sep 8, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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