diff --git a/DQMServices/Core/interface/DQMStore.h b/DQMServices/Core/interface/DQMStore.h index d8affd039894d..3da978631dfe0 100644 --- a/DQMServices/Core/interface/DQMStore.h +++ b/DQMServices/Core/interface/DQMStore.h @@ -751,6 +751,8 @@ namespace dqm { void printTrace(std::string const& message); // print a log message if ME matches trackME_. void debugTrackME(const char* message, MonitorElement* me_local, MonitorElement* me_global) const; + // accesor to keep MEsToSave_ private + const auto& getMEsToSave() const { return MEsToSave_; } private: // MEComparison is a name-only comparison on MEs and Paths, allowing @@ -792,14 +794,13 @@ namespace dqm { // Book MEs by lumi by default whenever possible. bool doSaveByLumi_; - + // Book MEs by lumi from list in DQMServices/Core/python/DQMStore_cfi.py + std::vector MEsToSave_; //just if perLS is ON + // if non-empty, debugTrackME calls will log some information whenever a // ME path contains this string. std::string trackME_; - public: - // Book MEs by lumi from list in DQMServices/Core/python/DQMStore_cfi.py - std::vector MEsToSave_; //just if perLS is ON }; } // namespace implementation diff --git a/DQMServices/Core/src/DQMStore.cc b/DQMServices/Core/src/DQMStore.cc index e034b3e358761..d4c2c2738371c 100644 --- a/DQMServices/Core/src/DQMStore.cc +++ b/DQMServices/Core/src/DQMStore.cc @@ -100,9 +100,11 @@ namespace dqm::implementation { medata.key_.path_ = path; medata.key_.kind_ = kind; - if (not store_->MEsToSave_.empty()) { + const auto& MEs = store_->getMEsToSave(); + + if (not MEs.empty()) { bool pathInList = false; - for (auto& thepath : store_->MEsToSave_) { + for (const auto& thepath : MEs) { if (fullpath == thepath) { medata.key_.scope_ = MonitorElementData::Scope::LUMI; pathInList = true;