6 #include <boost/regex.hpp> 65 std::vector<std::string>
folders;
70 static const boost::regex running_n_processes(
".*/Running [0-9]+ processes");
72 std::vector<std::string> subdirs = getter.
getSubdirs();
73 for (
auto const & subdir: subdirs) {
74 if (boost::regex_match(subdir, running_n_processes)) {
75 if (getter.
get(subdir +
"/throughput_sourced"))
77 folders.push_back(subdir +
"/throughput_sourced");
81 for (
auto const &
folder: folders) {
85 unsigned int nbins = sourced->GetXaxis()->GetNbins();
86 double range = sourced->GetXaxis()->GetXmax();
92 TH1F* concurrent = booker.
book1D(
"concurrent",
"Concurrent events being processed", nbins, 0., range)->
getTH1F();
95 for (
unsigned int i = 0;
i <= nbins+1; ++
i) {
96 sum += sourced->GetBinContent(
i) - retired->GetBinContent(
i);
97 concurrent->Fill( concurrent->GetXaxis()->GetBinCenter(
i), sum );
101 double avg_min =
std::min(sourced->GetMinimum(0.), retired->GetMinimum(0.));
102 double avg_max =
std::max(sourced->GetMaximum(), retired->GetMaximum());
103 double width = avg_max - avg_min;
104 avg_min = std::floor( avg_min - width * 0.2 );
105 if (avg_min < 0.) avg_min = 0.;
106 avg_max = std::ceil( avg_max + width * 0.2 );
107 width = avg_max - avg_min;
110 if (getter.
get(
folder +
"/average_sourced"))
117 average = booker.
book1D(
"average_sourced",
"Throughput (sourced events)", (
int) width, avg_min, avg_max)->
getTH1F();
118 for (
unsigned int i = first;
i <=
last; ++
i)
119 average->Fill(sourced->GetBinContent(
i));
122 if (getter.
get(
folder +
"/average_retired"))
125 first = retired->FindFirstBinAbove(0.);
126 last = retired->FindLastBinAbove(0.);
129 average = booker.
book1D(
"average_retired",
"Throughput (retired events)", (
int) width, avg_min, avg_max)->
getTH1F();
130 for (
unsigned int i = first;
i <=
last; ++
i)
131 average->Fill(retired->GetBinContent(
i));
139 descriptions.
add(
"throughputServiceClient", desc);
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
MonitorElement * get(const std::string &path)
#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
*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
void setCurrentFolder(const std::string &fullpath)
unsigned long long uint64_t
TH1F * getTH1F(void) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
~ThroughputServiceClient() override=default
std::vector< std::string > getSubdirs(void)
void removeElement(Args &&...args)