Skip to content

Commit

Permalink
Merge pull request #41375 from jfernan2/nanoDQMIOoneShot
Browse files Browse the repository at this point in the history
DQM perLS in one shot (part 2)
  • Loading branch information
cmsbuild authored Apr 25, 2023
2 parents b265809 + d1f49f5 commit 02d37b0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions DQMServices/Core/interface/DQMStore.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -792,14 +794,12 @@ 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<std::string> 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<std::string> MEsToSave_; //just if perLS is ON
};
} // namespace implementation

Expand Down
6 changes: 4 additions & 2 deletions DQMServices/Core/src/DQMStore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 02d37b0

Please sign in to comment.