diff --git a/DQMServices/Core/interface/DQMStore.h b/DQMServices/Core/interface/DQMStore.h index aeee70b341cc5..d8affd039894d 100644 --- a/DQMServices/Core/interface/DQMStore.h +++ b/DQMServices/Core/interface/DQMStore.h @@ -792,11 +792,14 @@ namespace dqm { // Book MEs by lumi by default whenever possible. bool doSaveByLumi_; - 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/python/nanoDQMIO_perLSoutput_cff.py b/DQMServices/Core/python/nanoDQMIO_perLSoutput_cff.py index 17040ccf9403f..3f3458a925aa6 100644 --- a/DQMServices/Core/python/nanoDQMIO_perLSoutput_cff.py +++ b/DQMServices/Core/python/nanoDQMIO_perLSoutput_cff.py @@ -139,16 +139,16 @@ "SiStrip/MechanicalView/MainDiagonal Position", "SiStrip/MechanicalView/NumberOfClustersInPixel", "SiStrip/MechanicalView/NumberOfClustersInStrip", - "Tracking/TrackParameters/GeneralProperties/Chi2oNDF_lumiFlag_GenTk", - "Tracking/TrackParameters/GeneralProperties/NumberOfRecHitsPerTrack_lumiFlag_GenTk", - "Tracking/TrackParameters/GeneralProperties/NumberOfTracks_lumiFlag_GenTk", + "Tracking/TrackParameters/generalTracks/LSanalysis/Chi2oNDF_lumiFlag_GenTk", + "Tracking/TrackParameters/generalTracks/LSanalysis/NumberOfRecHitsPerTrack_lumiFlag_GenTk", + "Tracking/TrackParameters/generalTracks/LSanalysis/NumberOfTracks_lumiFlag_GenTk", "Tracking/TrackParameters/highPurityTracks/pt_1/GeneralProperties/SIPDxyToPV_GenTk", "Tracking/TrackParameters/highPurityTracks/pt_1/GeneralProperties/SIPDzToPV_GenTk", "Tracking/TrackParameters/highPurityTracks/pt_1/GeneralProperties/SIP3DToPV_GenTk", "Tracking/TrackParameters/generalTracks/HitProperties/NumberOfMissingOuterRecHitsPerTrack_GenTk", "Tracking/TrackParameters/generalTracks/HitProperties/NumberMORecHitsPerTrackVsPt_GenTk", "OfflinePV/offlinePrimaryVertices/tagVtxProb", - "OfflinePV/offlinePrimaryVertice/tagType", + "OfflinePV/offlinePrimaryVertices/tagType", "OfflinePV/Resolution/PV/pull_x", "OfflinePV/Resolution/PV/pull_y", "OfflinePV/Resolution/PV/pull_z", diff --git a/DQMServices/Core/src/DQMStore.cc b/DQMServices/Core/src/DQMStore.cc index 0f95d9f75d56e..e034b3e358761 100644 --- a/DQMServices/Core/src/DQMStore.cc +++ b/DQMServices/Core/src/DQMStore.cc @@ -99,15 +99,28 @@ namespace dqm::implementation { MonitorElementData medata; medata.key_.path_ = path; medata.key_.kind_ = kind; - medata.key_.scope_ = this->scope_; + + if (not store_->MEsToSave_.empty()) { + bool pathInList = false; + for (auto& thepath : store_->MEsToSave_) { + if (fullpath == thepath) { + medata.key_.scope_ = MonitorElementData::Scope::LUMI; + pathInList = true; + break; + } + } + if (not pathInList) + medata.key_.scope_ = this->scope_; + } else + medata.key_.scope_ = this->scope_; // will be (0,0) ( = prototype) in the common case. // This branching is for harvesting, where we have run/lumi in the booker. - if (this->scope_ == MonitorElementData::Scope::JOB) { + if (medata.key_.scope_ == MonitorElementData::Scope::JOB) { medata.key_.id_ = edm::LuminosityBlockID(); - } else if (this->scope_ == MonitorElementData::Scope::RUN) { + } else if (medata.key_.scope_ == MonitorElementData::Scope::RUN) { medata.key_.id_ = edm::LuminosityBlockID(this->runlumi_.run(), 0); - } else if (this->scope_ == MonitorElementData::Scope::LUMI) { + } else if (medata.key_.scope_ == MonitorElementData::Scope::LUMI) { // In the messy case of legacy-booking a LUMI ME in beginRun (or // similar), where we don't have a valid lumi number yet, make sure to // book a prototype instead.