6 #include <boost/regex.hpp> 67 std::vector<std::string>
folders;
72 static const boost::regex running_n_processes(
".*/Running .*");
74 std::vector<std::string> subdirs = getter.
getSubdirs();
75 for (
auto const & subdir: subdirs) {
76 if (boost::regex_match(subdir, running_n_processes)) {
77 if (getter.
get(subdir +
"/throughput_sourced"))
79 folders.push_back(subdir);
88 if (getter.
get(summary_folder +
"/throughput_sourced"))
89 getter.
removeElement(summary_folder,
"throughput_sourced",
true);
90 if (getter.
get(summary_folder +
"/throughput_retired"))
91 getter.
removeElement(summary_folder,
"throughput_retired",
true);
93 auto folder = folders.begin();
94 TH1F * sourced = booker.
book1D(
"throughput_sourced", getter.
get(*
folder +
"/throughput_sourced")->
getTH1F())->getTH1F();
95 TH1F * retired = booker.
book1D(
"throughput_retired", getter.
get(*
folder +
"/throughput_retired")->
getTH1F())->getTH1F();
102 folders.push_back(
std::move(summary_folder));
104 for (
auto const &
folder: folders) {
108 unsigned int nbins = sourced->GetXaxis()->GetNbins();
109 double range = sourced->GetXaxis()->GetXmax();
115 TH1F* concurrent = booker.
book1D(
"concurrent",
"Concurrent events being processed", nbins, 0., range)->
getTH1F();
118 for (
unsigned int i = 0;
i <= nbins+1; ++
i) {
119 sum += sourced->GetBinContent(
i) - retired->GetBinContent(
i);
120 concurrent->Fill(concurrent->GetXaxis()->GetBinCenter(
i), sum);
124 double avg_min =
std::min(sourced->GetMinimum(0.), retired->GetMinimum(0.));
125 double avg_max =
std::max(sourced->GetMaximum(), retired->GetMaximum());
126 double width = avg_max - avg_min;
127 avg_min = std::floor(avg_min - width * 0.2);
128 if (avg_min < 0.) avg_min = 0.;
129 avg_max = std::ceil(avg_max + width * 0.2);
130 width = avg_max - avg_min;
133 if (getter.
get(
folder +
"/average_sourced"))
140 average = booker.
book1D(
"average_sourced",
"Throughput (sourced events)", (
int) width, avg_min, avg_max)->
getTH1F();
141 for (
unsigned int i = first;
i <=
last; ++
i)
142 average->Fill(sourced->GetBinContent(
i));
145 if (getter.
get(
folder +
"/average_retired"))
148 first = retired->FindFirstBinAbove(0.);
149 last = retired->FindLastBinAbove(0.);
152 average = booker.
book1D(
"average_retired",
"Throughput (retired events)", (
int) width, avg_min, avg_max)->
getTH1F();
153 for (
unsigned int i = first;
i <=
last; ++
i)
154 average->Fill(retired->GetBinContent(
i));
163 descriptions.
add(
"throughputServiceClient", desc);
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
#define DEFINE_FWK_MODULE(type)
void fillSummaryPlots(DQMStore::IBooker &booker, DQMStore::IGetter &getter)
ThroughputServiceClient(edm::ParameterSet const &)
void dqmEndLuminosityBlock(DQMStore::IBooker &booker, DQMStore::IGetter &getter, edm::LuminosityBlock const &, edm::EventSetup const &) override
void setCurrentFolder(std::string const &fullpath)
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle otherwise a larger ***bin number will have no effects or even make the ***precision lower than before *********************************************************************************************************it lies in three folders
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
MonitorElement * book1D(Args &&...args)
void dqmEndJob(DQMStore::IBooker &booker, DQMStore::IGetter &getter) override
MonitorElement * get(std::string const &path)
unsigned long long uint64_t
const std::string m_dqm_path
void add(std::string const &label, ParameterSetDescription const &psetDescription)
~ThroughputServiceClient() override=default
std::vector< std::string > getSubdirs()
void removeElement(Args &&...args)