69 std::vector<std::string>
folders;
74 static const boost::regex running_n_processes(
".*/Running [0-9]+ processes");
76 std::vector<std::string> subdirs = getter.
getSubdirs();
77 for (
auto const & subdir: subdirs) {
78 if (boost::regex_match(subdir, running_n_processes)) {
79 if (getter.
get(subdir +
"/throughput_sourced"))
81 folders.push_back(subdir +
"/throughput_sourced");
85 for (
auto const &
folder: folders) {
89 unsigned int nbins = sourced->GetXaxis()->GetNbins();
90 double range = sourced->GetXaxis()->GetXmax();
96 TH1F* concurrent = booker.
book1D(
"concurrent",
"Concurrent events being processed", nbins, 0., range)->
getTH1F();
99 for (
unsigned int i = 0;
i <= nbins+1; ++
i) {
100 sum += sourced->GetBinContent(
i) - retired->GetBinContent(
i);
101 concurrent->Fill( concurrent->GetXaxis()->GetBinCenter(
i), sum );
105 double avg_min =
std::min(sourced->GetMinimum(0.), retired->GetMinimum(0.));
106 double avg_max =
std::max(sourced->GetMaximum(), retired->GetMaximum());
107 double width = avg_max - avg_min;
108 avg_min = std::floor( avg_min - width * 0.2 );
109 if (avg_min < 0.) avg_min = 0.;
110 avg_max = std::ceil( avg_max + width * 0.2 );
111 width = avg_max - avg_min;
114 if (getter.
get(
folder +
"/average_sourced"))
121 average = booker.
book1D(
"average_sourced",
"Throughput (sourced events)", (
int) width, avg_min, avg_max)->
getTH1F();
122 for (
unsigned int i = first;
i <=
last; ++
i)
123 average->Fill(sourced->GetBinContent(
i));
126 if (getter.
get(
folder +
"/average_retired"))
129 first = retired->FindFirstBinAbove(0.);
130 last = retired->FindLastBinAbove(0.);
133 average = booker.
book1D(
"average_retired",
"Throughput (retired events)", (
int) width, avg_min, avg_max)->
getTH1F();
134 for (
unsigned int i = first;
i <=
last; ++
i)
135 average->Fill(retired->GetBinContent(
i));
MonitorElement * get(const std::string &path)
*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
MonitorElement * book1D(Args &&...args)
void setCurrentFolder(const std::string &fullpath)
unsigned long long uint64_t
TH1F * getTH1F(void) const
std::vector< std::string > getSubdirs(void)
void removeElement(Args &&...args)