diff --git a/DQM/Integration/python/config/environment_cfi.py b/DQM/Integration/python/config/environment_cfi.py index cc93abe9b7b96..4da2045cdd296 100644 --- a/DQM/Integration/python/config/environment_cfi.py +++ b/DQM/Integration/python/config/environment_cfi.py @@ -58,7 +58,7 @@ def loadDQMRunConfigFromFile(): # now start the actual configuration print("dqmRunConfig:", dqmRunConfig) -from DQMServices.Core.DQMStore_cfi import * +from DQMServices.Core.DQMStore_Online_cfi import * DQM = cms.Service("DQM", debug = cms.untracked.bool(False), diff --git a/DQMServices/Core/interface/DQMStore.h b/DQMServices/Core/interface/DQMStore.h index 9add4570b2fd8..7413255a48f58 100644 --- a/DQMServices/Core/interface/DQMStore.h +++ b/DQMServices/Core/interface/DQMStore.h @@ -753,6 +753,8 @@ namespace dqm { void debugTrackME(const char* message, MonitorElement* me_local, MonitorElement* me_global) const; // accesor to keep MEsToSave_ private const auto& getMEsToSave() const { return MEsToSave_; } + // accesor to keep onlineMode_ private + const bool& getMode() const { return onlineMode_; } private: // MEComparison is a name-only comparison on MEs and Paths, allowing @@ -800,6 +802,9 @@ namespace dqm { // if non-empty, debugTrackME calls will log some information whenever a // ME path contains this string. std::string trackME_; + + // Online mode + bool onlineMode_; }; } // namespace implementation diff --git a/DQMServices/Core/python/DQMStore_Online_cfi.py b/DQMServices/Core/python/DQMStore_Online_cfi.py new file mode 100644 index 0000000000000..559629ff66877 --- /dev/null +++ b/DQMServices/Core/python/DQMStore_Online_cfi.py @@ -0,0 +1,20 @@ +import FWCore.ParameterSet.Config as cms +from DQMServices.Core.nanoDQMIO_perLSoutput_cff import * + +DQMStore = cms.Service("DQMStore", + verbose = cms.untracked.int32(0), + # similar to LSBasedMode but for offline. Explicitly sets LumiFLag on all + # MEs/modules that allow it (canSaveByLumi) + saveByLumi = cms.untracked.bool(False), + #Following list has no effect if saveByLumi is False + MEsToSave = cms.untracked.vstring(nanoDQMIO_perLSoutput.MEsToSave), + trackME = cms.untracked.string(""), + #Legacy code should be out. Suggested on: + #https://github.com/cms-sw/cmssw/pull/34231#issuecomment-874789622 + assertLegacySafe = cms.untracked.bool(False), + # UNUSED: historical HLT configs expect this option to be present, so it + # remains here, even though the DQMStore does not use it any more. + enableMultiThread = cms.untracked.bool(True), + # Online mode + onlineMode = cms.untracked.bool(True) +) diff --git a/DQMServices/Core/python/DQMStore_cfi.py b/DQMServices/Core/python/DQMStore_cfi.py index a550fc99ffce3..355ab4085adb1 100644 --- a/DQMServices/Core/python/DQMStore_cfi.py +++ b/DQMServices/Core/python/DQMStore_cfi.py @@ -14,5 +14,7 @@ assertLegacySafe = cms.untracked.bool(False), # UNUSED: historical HLT configs expect this option to be present, so it # remains here, even though the DQMStore does not use it any more. - enableMultiThread = cms.untracked.bool(True) + enableMultiThread = cms.untracked.bool(True), + # Online mode + onlineMode = cms.untracked.bool(False) ) diff --git a/DQMServices/Core/src/DQMStore.cc b/DQMServices/Core/src/DQMStore.cc index d4c2c2738371c..c924eda275300 100644 --- a/DQMServices/Core/src/DQMStore.cc +++ b/DQMServices/Core/src/DQMStore.cc @@ -102,7 +102,7 @@ namespace dqm::implementation { const auto& MEs = store_->getMEsToSave(); - if (not MEs.empty()) { + if (not MEs.empty() && not store_->getMode()) { bool pathInList = false; for (const auto& thepath : MEs) { if (fullpath == thepath) { @@ -684,7 +684,7 @@ namespace dqm::implementation { for (std::vector::const_iterator ipath = store_->MEsToSave_.begin(); ipath != store_->MEsToSave_.end(); ++ipath) { - std::string nameToSave = *ipath; + const std::string& nameToSave = *ipath; // option 1 (used in the past): inclusive selection // (store all MEs that contain any of the requested patterns) // if (name.find(nameToSave) != std::string::npos) { @@ -781,6 +781,7 @@ namespace dqm::implementation { doSaveByLumi_ = pset.getUntrackedParameter("saveByLumi", false); MEsToSave_ = pset.getUntrackedParameter>("MEsToSave", std::vector()); trackME_ = pset.getUntrackedParameter("trackME", ""); + onlineMode_ = pset.getUntrackedParameter("onlineMode", false); // Set lumi and run for legacy booking. // This is no more than a guess with concurrent runs/lumis, but should be