diff --git a/DQMServices/Components/plugins/DQMEventInfo.cc b/DQMServices/Components/plugins/DQMEventInfo.cc index 2cea3a97adf6b..081d4b7ab7b51 100644 --- a/DQMServices/Components/plugins/DQMEventInfo.cc +++ b/DQMServices/Components/plugins/DQMEventInfo.cc @@ -266,8 +266,16 @@ void DQMEventInfo::analyzeProvInfo(const edm::Event& event) { // Getting parameters for that process edm::ParameterSet ps; event.getProcessParameterSet(processName, ps); - // Getting the global tag - globalTag_ = ps.getParameterSet("PoolDBESSource@GlobalTag").getParameter("globaltag"); + + // Check if the 'PoolDBESSource@GlobalTag' ParameterSet exists + if (ps.exists("PoolDBESSource@GlobalTag")) { + // Getting the global tag + globalTag_ = ps.getParameterSet("PoolDBESSource@GlobalTag").getParameter("globaltag"); + } else { + // Handle the case where 'PoolDBESSource@GlobalTag' is missing + // You can set a default value or take some other action + edm::LogInfo("Configuration") << "ParameterSet 'PoolDBESSource@GlobalTag' not found. Using default global tag."; + } versGlobaltag_->Fill(globalTag_); // Finaly: Setting globalTagRetrieved_ to true, since we got it now diff --git a/DQMServices/Components/python/DQMEventInfo_cfi.py b/DQMServices/Components/python/DQMEventInfo_cfi.py index c7c25568bbe27..5f7890325f503 100644 --- a/DQMServices/Components/python/DQMEventInfo_cfi.py +++ b/DQMServices/Components/python/DQMEventInfo_cfi.py @@ -10,6 +10,6 @@ # define folder to store event info (default: EventInfo) eventInfoFolder = cms.untracked.string('EventInfo'), # use the Global Tag of the last (!) HLT processing - showHLTGlobalTag = cms.untracked.bool(True) + showHLTGlobalTag = cms.untracked.bool(False) )