Skip to content

Commit

Permalink
Merge pull request #856 in B2/basf2 from bugfix/BII-9275-errors-durin…
Browse files Browse the repository at this point in the history
…g-physics-runs-release-06-01 to release/06-01

* commit 'b389f733691d7a61d11a57ac15eece5a24a3db70':
  fixing online processing errors
  • Loading branch information
GiacomoXT committed Mar 27, 2022
2 parents 00ad035 + b389f73 commit 7cf7062
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions top/modules/TOPChannelMasker/include/TOPChannelMaskerModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,8 @@ namespace Belle2 {
DBObjPtr<TOPCalChannelRQE> m_channelRQE; /**< channel relative quantum effi. */
DBObjPtr<TOPCalChannelThresholdEff> m_thresholdEff; /**< channel threshold effi. */

// other
unsigned m_errorCount = 0; /**< error count */

};
}
14 changes: 14 additions & 0 deletions top/modules/TOPChannelMasker/src/TOPChannelMaskerModule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,20 @@ namespace Belle2 {
digit.setHitQuality(TOPDigit::c_Masked);
continue;
}
if (not m_savedAsicMask.isActive(slotID, channel)) {
digit.setHitQuality(TOPDigit::c_Masked);
const unsigned maxCount = 10; // at HLT this means (10 * number-of-processes) messages before being suppressed
if (m_errorCount < maxCount) {
B2ERROR("Unexpected hit found in a channel that is masked-out by firmware"
<< LogVar("slotID", slotID) << LogVar("channel", channel));
} else if (m_errorCount == maxCount) {
B2ERROR("Unexpected hit found in a channel that is masked-out by firmware"
<< LogVar("slotID", slotID) << LogVar("channel", channel)
<< LogVar("... message will be suppressed now, errorCount", m_errorCount));
}
m_errorCount++;
continue;
}
if (m_maskUncalibratedChannelT0 and not m_channelT0->isCalibrated(slotID, channel)) {
digit.setHitQuality(TOPDigit::c_Uncalibrated);
continue;
Expand Down

0 comments on commit 7cf7062

Please sign in to comment.