From 5ec229e9a88206826c16c9c36971ffe92e59db3f Mon Sep 17 00:00:00 2001 From: Javier Date: Mon, 27 Mar 2023 16:14:18 +0200 Subject: [PATCH 1/9] Fixed typo in selection --- DQMServices/Core/python/nanoDQMIO_perLSoutput_cff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DQMServices/Core/python/nanoDQMIO_perLSoutput_cff.py b/DQMServices/Core/python/nanoDQMIO_perLSoutput_cff.py index 17040ccf9403f..0ad0b79be66cd 100644 --- a/DQMServices/Core/python/nanoDQMIO_perLSoutput_cff.py +++ b/DQMServices/Core/python/nanoDQMIO_perLSoutput_cff.py @@ -148,7 +148,7 @@ "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", From 6c2afc8a53abc216a26b373bbae054f9a34a75e8 Mon Sep 17 00:00:00 2001 From: Javier Date: Mon, 27 Mar 2023 16:24:54 +0200 Subject: [PATCH 2/9] First working version to test harvesting --- DQMServices/Core/interface/DQMStore.h | 6 +++++- DQMServices/Core/src/DQMStore.cc | 24 ++++++++++++++++++++---- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/DQMServices/Core/interface/DQMStore.h b/DQMServices/Core/interface/DQMStore.h index aeee70b341cc5..dbc2f9b6df5da 100644 --- a/DQMServices/Core/interface/DQMStore.h +++ b/DQMServices/Core/interface/DQMStore.h @@ -792,11 +792,15 @@ namespace dqm { // Book MEs by lumi by default whenever possible. bool doSaveByLumi_; - std::vector MEsToSave_; //just if perLS is ON + // 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 0f95d9f75d56e..1b0d7a4f2a745 100644 --- a/DQMServices/Core/src/DQMStore.cc +++ b/DQMServices/Core/src/DQMStore.cc @@ -99,15 +99,31 @@ namespace dqm::implementation { MonitorElementData medata; medata.key_.path_ = path; medata.key_.kind_ = kind; - medata.key_.scope_ = this->scope_; + + bool pathInList = false; + if (not store_->MEsToSave_.empty()) { + for (std::vector::const_iterator ipath = store_->MEsToSave_.begin(); + ipath != store_->MEsToSave_.end(); + ++ipath) { + if (fullpath == ipath->data()) { + medata.key_.scope_ = MonitorElementData::Scope::LUMI; + this->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. From a43515f755858cdbf306536f1373865a8deb4cec Mon Sep 17 00:00:00 2001 From: Javier Date: Mon, 27 Mar 2023 16:54:09 +0200 Subject: [PATCH 3/9] code-check changes --- DQMServices/Core/src/DQMStore.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DQMServices/Core/src/DQMStore.cc b/DQMServices/Core/src/DQMStore.cc index 1b0d7a4f2a745..a88308e103d76 100644 --- a/DQMServices/Core/src/DQMStore.cc +++ b/DQMServices/Core/src/DQMStore.cc @@ -105,7 +105,7 @@ namespace dqm::implementation { for (std::vector::const_iterator ipath = store_->MEsToSave_.begin(); ipath != store_->MEsToSave_.end(); ++ipath) { - if (fullpath == ipath->data()) { + if (fullpath == (*ipath)) { medata.key_.scope_ = MonitorElementData::Scope::LUMI; this->scope_ = MonitorElementData::Scope::LUMI; pathInList = true; From 4d1a234f7829d7a0d4a56fa6f4f4f94da10c2c92 Mon Sep 17 00:00:00 2001 From: Javier Date: Wed, 29 Mar 2023 19:16:47 +0200 Subject: [PATCH 4/9] Working changes --- DQMServices/Core/python/nanoDQMIO_perLSoutput_cff.py | 6 +++--- DQMServices/Core/src/DQMStore.cc | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/DQMServices/Core/python/nanoDQMIO_perLSoutput_cff.py b/DQMServices/Core/python/nanoDQMIO_perLSoutput_cff.py index 0ad0b79be66cd..3deb456365a5c 100644 --- a/DQMServices/Core/python/nanoDQMIO_perLSoutput_cff.py +++ b/DQMServices/Core/python/nanoDQMIO_perLSoutput_cff.py @@ -139,9 +139,9 @@ "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/GeneralProperties/Chi2oNDF_lumiFlag_GenTk", #non existing + "Tracking/TrackParameters/GeneralProperties/NumberOfRecHitsPerTrack_lumiFlag_GenTk", #non existing + "Tracking/TrackParameters/GeneralProperties/NumberOfTracks_lumiFlag_GenTk", #non existing "Tracking/TrackParameters/highPurityTracks/pt_1/GeneralProperties/SIPDxyToPV_GenTk", "Tracking/TrackParameters/highPurityTracks/pt_1/GeneralProperties/SIPDzToPV_GenTk", "Tracking/TrackParameters/highPurityTracks/pt_1/GeneralProperties/SIP3DToPV_GenTk", diff --git a/DQMServices/Core/src/DQMStore.cc b/DQMServices/Core/src/DQMStore.cc index a88308e103d76..d9cbf3ec29081 100644 --- a/DQMServices/Core/src/DQMStore.cc +++ b/DQMServices/Core/src/DQMStore.cc @@ -107,7 +107,6 @@ namespace dqm::implementation { ++ipath) { if (fullpath == (*ipath)) { medata.key_.scope_ = MonitorElementData::Scope::LUMI; - this->scope_ = MonitorElementData::Scope::LUMI; pathInList = true; break; } From 8830877c4a26055412590d71f05bafc7edb04822 Mon Sep 17 00:00:00 2001 From: jfernan2 Date: Mon, 10 Apr 2023 12:35:14 +0200 Subject: [PATCH 5/9] Changes suggested by M. Musich --- DQMServices/Core/python/nanoDQMIO_perLSoutput_cff.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DQMServices/Core/python/nanoDQMIO_perLSoutput_cff.py b/DQMServices/Core/python/nanoDQMIO_perLSoutput_cff.py index 3deb456365a5c..3f3458a925aa6 100644 --- a/DQMServices/Core/python/nanoDQMIO_perLSoutput_cff.py +++ b/DQMServices/Core/python/nanoDQMIO_perLSoutput_cff.py @@ -139,9 +139,9 @@ "SiStrip/MechanicalView/MainDiagonal Position", "SiStrip/MechanicalView/NumberOfClustersInPixel", "SiStrip/MechanicalView/NumberOfClustersInStrip", - "Tracking/TrackParameters/GeneralProperties/Chi2oNDF_lumiFlag_GenTk", #non existing - "Tracking/TrackParameters/GeneralProperties/NumberOfRecHitsPerTrack_lumiFlag_GenTk", #non existing - "Tracking/TrackParameters/GeneralProperties/NumberOfTracks_lumiFlag_GenTk", #non existing + "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", From d7159628f8d665e37a4103b86768a67bc3ca7b33 Mon Sep 17 00:00:00 2001 From: jfernan2 Date: Tue, 11 Apr 2023 20:16:02 +0200 Subject: [PATCH 6/9] Remove commented line --- DQMServices/Core/interface/DQMStore.h | 1 - 1 file changed, 1 deletion(-) diff --git a/DQMServices/Core/interface/DQMStore.h b/DQMServices/Core/interface/DQMStore.h index dbc2f9b6df5da..d8affd039894d 100644 --- a/DQMServices/Core/interface/DQMStore.h +++ b/DQMServices/Core/interface/DQMStore.h @@ -792,7 +792,6 @@ 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. From 792c2214db9db697ab30c49c48944c2326fe3323 Mon Sep 17 00:00:00 2001 From: jfernan2 Date: Tue, 11 Apr 2023 20:17:06 +0200 Subject: [PATCH 7/9] Update DQMServices/Core/src/DQMStore.cc Co-authored-by: Andrea Perrotta --- DQMServices/Core/src/DQMStore.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/DQMServices/Core/src/DQMStore.cc b/DQMServices/Core/src/DQMStore.cc index d9cbf3ec29081..95365a90d073c 100644 --- a/DQMServices/Core/src/DQMStore.cc +++ b/DQMServices/Core/src/DQMStore.cc @@ -102,10 +102,8 @@ namespace dqm::implementation { bool pathInList = false; if (not store_->MEsToSave_.empty()) { - for (std::vector::const_iterator ipath = store_->MEsToSave_.begin(); - ipath != store_->MEsToSave_.end(); - ++ipath) { - if (fullpath == (*ipath)) { + for (auto& thepath : store_->MEsToSave_) { + if (fullpath == thepath) { medata.key_.scope_ = MonitorElementData::Scope::LUMI; pathInList = true; break; From 1c707aeda767625b699044faf13d1af44173682b Mon Sep 17 00:00:00 2001 From: jfernan2 Date: Tue, 11 Apr 2023 20:17:23 +0200 Subject: [PATCH 8/9] Update DQMServices/Core/src/DQMStore.cc Co-authored-by: Andrea Perrotta --- DQMServices/Core/src/DQMStore.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DQMServices/Core/src/DQMStore.cc b/DQMServices/Core/src/DQMStore.cc index 95365a90d073c..f4b070ece9bdb 100644 --- a/DQMServices/Core/src/DQMStore.cc +++ b/DQMServices/Core/src/DQMStore.cc @@ -100,8 +100,8 @@ namespace dqm::implementation { medata.key_.path_ = path; medata.key_.kind_ = kind; - bool pathInList = false; if (not store_->MEsToSave_.empty()) { + bool pathInList = false; for (auto& thepath : store_->MEsToSave_) { if (fullpath == thepath) { medata.key_.scope_ = MonitorElementData::Scope::LUMI; From 52fa82207dee6faafcce31972fbe85842e345580 Mon Sep 17 00:00:00 2001 From: Javier Date: Tue, 11 Apr 2023 20:32:03 +0200 Subject: [PATCH 9/9] Code format --- DQMServices/Core/src/DQMStore.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DQMServices/Core/src/DQMStore.cc b/DQMServices/Core/src/DQMStore.cc index f4b070ece9bdb..e034b3e358761 100644 --- a/DQMServices/Core/src/DQMStore.cc +++ b/DQMServices/Core/src/DQMStore.cc @@ -101,7 +101,7 @@ namespace dqm::implementation { medata.key_.kind_ = kind; if (not store_->MEsToSave_.empty()) { - bool pathInList = false; + bool pathInList = false; for (auto& thepath : store_->MEsToSave_) { if (fullpath == thepath) { medata.key_.scope_ = MonitorElementData::Scope::LUMI;