Skip to content
Snippets Groups Projects
Commit c5b0ec40 authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

Merge branch 'fix_NdeviationgChannels' into 'master'

Ndefiating channels fix

See merge request atlas/athena!46972
parents 275da319 bf876ba7
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@ LArHVCorrectionMonAlg::LArHVCorrectionMonAlg(const std::string& name, ISvcLocato
: AthMonitorAlgorithm(name, pSvcLocator),
m_LArOnlineIDHelper(0),
m_caloIdMgr(0),
m_lastLB(0)
m_filledLB()
{ }
/*---------------------------------------------------------*/
......@@ -46,17 +46,18 @@ StatusCode LArHVCorrectionMonAlg::initialize()
StatusCode LArHVCorrectionMonAlg::fillHistograms(const EventContext& ctx) const
{
ATH_MSG_DEBUG( "in fillHists()" );
bool doMonitor = false;
unsigned int thisLB=ctx.eventID().lumi_block();
bool doMonitor=false;
{
std::lock_guard<std::mutex> lock(m_mut);
if (ctx.eventID().lumi_block() > m_lastLB) {
m_lastLB = ctx.eventID().lumi_block();
doMonitor = true;
if(!m_filledLB.count(thisLB)) {
m_filledLB.insert(thisLB);
doMonitor=true;
}
}
if (doMonitor) {
if(doMonitor) { //LB not yet monitored, so do the monitoring now
const CaloDetDescrManager* ddman = nullptr;
ATH_CHECK( detStore()->retrieve (ddman, "CaloMgr") );
......
......@@ -29,6 +29,7 @@
#include <string>
#include <map>
#include <mutex>
#include <set>
class LArOnlineID;
class CaloDetDescrManager;
......@@ -71,7 +72,7 @@ class LArHVCorrectionMonAlg: public AthMonitorAlgorithm
// Other things
// FIXME: How to find new LB, and fill only once per LB ?
mutable unsigned int m_lastLB ATLAS_THREAD_SAFE;
mutable std::set<unsigned int> m_filledLB ATLAS_THREAD_SAFE;
mutable std::mutex m_mut ATLAS_THREAD_SAFE;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment