Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DQM perLS in one shot #41196

Merged
merged 9 commits into from
Apr 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion DQMServices/Core/interface/DQMStore.h
Original file line number Diff line number Diff line change
Expand Up @@ -792,11 +792,14 @@ namespace dqm {

// Book MEs by lumi by default whenever possible.
bool doSaveByLumi_;
std::vector<std::string> MEsToSave_; //just if perLS is ON
jfernan2 marked this conversation as resolved.
Show resolved Hide resolved

// 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<std::string> MEsToSave_; //just if perLS is ON
};
} // namespace implementation

Expand Down
8 changes: 4 additions & 4 deletions DQMServices/Core/python/nanoDQMIO_perLSoutput_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
21 changes: 17 additions & 4 deletions DQMServices/Core/src/DQMStore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down