Skip to content

Commit

Permalink
use RUN scope in ThroughputService
Browse files Browse the repository at this point in the history
  • Loading branch information
missirol committed Dec 20, 2022
1 parent aa2e9f8 commit fda3c14
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion HLTrigger/Timer/plugins/ThroughputService.cc
Expand Up @@ -65,7 +65,7 @@ void ThroughputService::preallocate(edm::service::SystemBounds const& bounds) {
void ThroughputService::preGlobalBeginRun(edm::GlobalContext const& gc) {
// if the DQMStore is available, book the DQM histograms
// check that the DQMStore service is available
if (m_enable_dqm and not edm::Service<dqm::legacy::DQMStore>().isAvailable()) {
if (m_enable_dqm and not edm::Service<DQMStore>().isAvailable()) {
// the DQMStore is not available, disable all DQM plots
m_enable_dqm = false;
edm::LogWarning("ThroughputService") << "The DQMStore is not avalable, the DQM plots will not be generated";
Expand All @@ -85,6 +85,7 @@ void ThroughputService::preGlobalBeginRun(edm::GlobalContext const& gc) {

// define a callback that can book the histograms
auto bookTransactionCallback = [&, this](DQMStore::IBooker& booker, DQMStore::IGetter&) {
auto scope = dqm::reco::DQMStore::IBooker::UseRunScope(booker);
booker.setCurrentFolder(m_dqm_path);
m_sourced_events = booker.book1D("throughput_sourced", "Throughput (sourced events)", bins, 0., range);
m_sourced_events->setXTitle("time [s]");
Expand Down
4 changes: 2 additions & 2 deletions HLTrigger/Timer/plugins/ThroughputService.h
Expand Up @@ -45,8 +45,8 @@ class ThroughputService {
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);

private:
dqm::reco::MonitorElement* m_sourced_events;
dqm::reco::MonitorElement* m_retired_events;
dqm::reco::MonitorElement* m_sourced_events = nullptr;
dqm::reco::MonitorElement* m_retired_events = nullptr;

std::chrono::system_clock::time_point m_startup;

Expand Down

0 comments on commit fda3c14

Please sign in to comment.