Skip to content
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
12 changes: 10 additions & 2 deletions DQMServices/Components/plugins/DQMEventInfo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string>("globaltag");

// Check if the 'PoolDBESSource@GlobalTag' ParameterSet exists
if (ps.exists("PoolDBESSource@GlobalTag")) {
// Getting the global tag
globalTag_ = ps.getParameterSet("PoolDBESSource@GlobalTag").getParameter<std::string>("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
Expand Down
2 changes: 1 addition & 1 deletion DQMServices/Components/python/DQMEventInfo_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)