Skip to content

AthenaMonitoringKernel: Protect histogram rebinning by OH mutex

Frank Winklmeier requested to merge fwinkl/athena:stringmon into master

Put the duplicated shouldRebinHistogram and rebinHistogram implementations into the new HistogramFillerUtils.h file.

In addition, when re-binnning a histogram make sure to take the OH mutex to avoid publishing the histogram while it is being re-binned, which often results in a crash. In offline this is a no-op. Added helper functions (and unit tests) to decide if a histogram Fill would result in the rebinning of the histogram.

There should be no functional changes here and for most use-cases the overhead is one additional if statement.

Minor change:

  • Replace std::lock_guard by std::scoped_lock

cc @tbold @rbielski @ponyisi @cburton

Merge request reports