Skip to content

Commit

Permalink
added "fillEveryLumiSection" parameter to ThroughputServiceClient
Browse files Browse the repository at this point in the history
  • Loading branch information
missirol committed Dec 20, 2022
1 parent 55f2ebb commit aa2e9f8
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions HLTrigger/Timer/plugins/ThroughputServiceClient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class ThroughputServiceClient : public DQMEDHarvester {
private:
const std::string m_dqm_path;
const bool m_dqm_merge;
const bool m_fillEveryLumiSection;

void dqmEndLuminosityBlock(DQMStore::IBooker &booker,
DQMStore::IGetter &getter,
Expand All @@ -45,7 +46,8 @@ class ThroughputServiceClient : public DQMEDHarvester {

ThroughputServiceClient::ThroughputServiceClient(edm::ParameterSet const &config)
: m_dqm_path(config.getUntrackedParameter<std::string>("dqmPath")),
m_dqm_merge(config.getUntrackedParameter<bool>("createSummary")) {}
m_dqm_merge(config.getUntrackedParameter<bool>("createSummary")),
m_fillEveryLumiSection(config.getParameter<bool>("fillEveryLumiSection")) {}

void ThroughputServiceClient::dqmEndJob(DQMStore::IBooker &booker, DQMStore::IGetter &getter) {
fillSummaryPlots(booker, getter);
Expand All @@ -55,7 +57,9 @@ void ThroughputServiceClient::dqmEndLuminosityBlock(DQMStore::IBooker &booker,
DQMStore::IGetter &getter,
edm::LuminosityBlock const &,
edm::EventSetup const &) {
fillSummaryPlots(booker, getter);
if (m_fillEveryLumiSection) {
fillSummaryPlots(booker, getter);
}
}

void ThroughputServiceClient::fillSummaryPlots(DQMStore::IBooker &booker, DQMStore::IGetter &getter) {
Expand All @@ -70,9 +74,10 @@ void ThroughputServiceClient::fillSummaryPlots(DQMStore::IBooker &booker, DQMSto
std::vector<std::string> subdirs = getter.getSubdirs();
for (auto const &subdir : subdirs) {
if (boost::regex_match(subdir, running_n_processes)) {
if (getter.get(subdir + "/throughput_sourced"))
if (getter.get(subdir + "/throughput_sourced")) {
// the plots are in a per-number-of-processes subfolder
folders.push_back(subdir);
}
}
}
}
Expand Down Expand Up @@ -146,6 +151,7 @@ void ThroughputServiceClient::fillDescriptions(edm::ConfigurationDescriptions &d
edm::ParameterSetDescription desc;
desc.addUntracked<std::string>("dqmPath", "HLT/Throughput");
desc.addUntracked<bool>("createSummary", true);
desc.add<bool>("fillEveryLumiSection", true);
descriptions.add("throughputServiceClient", desc);
}

Expand Down

0 comments on commit aa2e9f8

Please sign in to comment.