25 const auto &
name = ci.GetName();
26 const auto pass = ci.GetPass();
27 const auto all = ci.GetAll();
28 const auto eff = ci.GetEff();
29 const auto cumulativeEff = 100.f * float(pass) / float(allEntries);
30 Printf(
"%-10s: pass=%-10lld all=%-10lld -- eff=%3.2f %% cumulative eff=%3.2f %%",
name.c_str(), pass, all, eff, cumulativeEff);
35 if (cutName.empty()) {
36 throw std::runtime_error(
"Cannot look for an unnamed cut.");
38 auto pred = [&cutName](
const TCutInfo &ci) {
return ci.GetName() == cutName; };
40 const auto it = std::find_if(
fCutInfos.begin(), ciItEnd, pred);
42 std::string err =
"Cannot find a cut called \"";
44 err +=
"\". Available named cuts are: \n";
46 err +=
" - " + ci.GetName() +
"\n";
48 throw std::runtime_error(err);
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
std::vector< TCutInfo > fCutInfos
const TCutInfo & operator[](std::string_view cutName)
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.