From 993b3884d5a0bdf882e694342c2d369980d3706f Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Wed, 20 Oct 2021 12:11:40 -0500 Subject: [PATCH] Fix concurrent lumi usage in DQMStore Avoid deleting the MonitorElement meta data for localMEs --- DQMServices/Core/src/DQMStore.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/DQMServices/Core/src/DQMStore.cc b/DQMServices/Core/src/DQMStore.cc index 01aa1b3c1e1f1..bc685f754f988 100644 --- a/DQMServices/Core/src/DQMStore.cc +++ b/DQMServices/Core/src/DQMStore.cc @@ -563,6 +563,14 @@ namespace dqm::implementation { auto other = this->findME(me); if (other) { // we still have a global one, so we can just remove this. + for (auto& locals : localMEs_) { + auto itLocal = locals.second.find(me); + if (itLocal != locals.second.end() and (*itLocal)->mutable_ == me->mutable_) { + debugTrackME("cleanupLumi (switchData)", *itLocal, me); + (*itLocal)->switchData(other); + break; + } + } debugTrackME("cleanupLumi (delete)", nullptr, me); delete me; } else {