#include <LastBinThreshold.h>
Definition at line 18 of file LastBinThreshold.h.
◆ LastBinThreshold()
dqm_algorithms::LastBinThreshold::LastBinThreshold |
( |
const std::string & |
name | ) |
|
|
explicit |
◆ ~LastBinThreshold()
dqm_algorithms::LastBinThreshold::~LastBinThreshold |
( |
| ) |
|
|
virtual |
◆ clone()
◆ exceeds()
bool dqm_algorithms::LastBinThreshold::exceeds |
( |
double |
value, |
|
|
double |
threshold |
|
) |
| const |
|
inlineprivate |
◆ execute()
dqm_core::Result * dqm_algorithms::LastBinThreshold::execute |
( |
const std::string & |
name, |
|
|
const TObject & |
object, |
|
|
const dqm_core::AlgorithmConfig & |
config |
|
) |
| |
|
virtual |
Definition at line 49 of file LastBinThreshold.cxx.
51 if (!
object.
IsA()->InheritsFrom(
"TH1")) {
52 throw dqm_core::BadConfig(ERS_HERE,
name,
"does not inherit from TH1");
56 throw dqm_core::BadConfig(ERS_HERE,
name,
"has more than one dimension");
68 while ((
histogram.GetBinContent(currentBin) == 0) && (currentBin > 0)) --currentBin;
73 result->tags_[
"LastBinNumber"] = currentBin;
79 if (currentBin == 0)
break;
90 result->tags_[
"GreenExceeded"] = grnExceeded;
91 result->tags_[
"RedExceeded"] = redExceeded;
92 if (grnExceeded < redExceeded)
93 throw dqm_core::BadConfig(ERS_HERE,
name,
"more bins exceeded the red threshold than the green threshold, this shouldn't happen");
◆ getParameters()
void dqm_algorithms::LastBinThreshold::getParameters |
( |
const std::string & |
name, |
|
|
const dqm_core::AlgorithmConfig & |
config |
|
) |
| |
|
private |
Definition at line 125 of file LastBinThreshold.cxx.
138 throw dqm_core::BadConfig(ERS_HERE,
name,
"NBinsToWatch must be 1 or greater");
140 throw dqm_core::BadConfig(ERS_HERE,
name,
"NBinsToExceed must be 1 or greater");
142 throw dqm_core::BadConfig(ERS_HERE,
name,
"NBinsToExceed must not be greater than NBinsToWatch");
143 if ((par2 != 0) && (par2 != 1))
144 throw dqm_core::BadConfig(ERS_HERE,
name,
"GreaterThan must be 0 or 1");
145 if ((par3 != 0) && (par3 != 1))
146 throw dqm_core::BadConfig(ERS_HERE,
name,
"ValueThresholds must be 0 or 1");
147 if ((par4 != 0) && (par4 != 1) && (par4 != 2))
148 throw dqm_core::BadConfig(ERS_HERE,
name,
"GetEntries must be 0, 1 or 2");
◆ getThresholds()
void dqm_algorithms::LastBinThreshold::getThresholds |
( |
const std::string & |
name, |
|
|
const dqm_core::AlgorithmConfig & |
config |
|
) |
| |
|
private |
Definition at line 157 of file LastBinThreshold.cxx.
163 throw dqm_core::BadConfig(ERS_HERE,
name,
"using greater-than comparison, but red threshold is less than green threshold");
165 throw dqm_core::BadConfig(ERS_HERE,
name,
"using less-than comparison, but red threshold is greater than green threshold");
◆ printDescription()
void dqm_algorithms::LastBinThreshold::printDescription |
( |
std::ostream & |
out | ) |
|
|
virtual |
Definition at line 101 of file LastBinThreshold.cxx.
103 out <<
m_name <<
": Checks whether the last bin(s) of a histogram exceed the given thresholds.\n"
104 "Mandatory green/red thresholds: Threshold - the thresholds against which the bin contents are compared.\n"
105 "Optional parameter: NBinsToWatch - number of final bins that will be checked. (NBinsToWatch >= 1, default = 1)\n"
106 " The result of the algorithm is the worst-case result of all checked bins.\n"
107 "Optional parameter: NBinsToExceed - minimal number of checked bins that have to exceed the given thresholds\n"
108 " before the corresponding result is returned. (1 <= NBinsToExceed <= NBinsToWatch, default = 1)\n"
109 "Optional parameter: GreaterThan - how the values will be compared. (GreaterThan = {0, 1}, default = 1)\n"
110 " GreaterThan == 0: the given thresholds are lower thresholds. (requires green >= red)\n"
111 " GreaterThan == 1: the given thresholds are upper thresholds. (requires green <= red)\n"
112 "Optional parameter: ValueThresholds - which values will be compared. (ValueThresholds = {0, 1}, default = 0)\n"
113 " ValueThresholds == 0: the thresholds correspond to the bin content.\n"
114 " ValueThresholds == 1: the thresholds correspond to the bin x-axis value.\n"
115 "Optional parameter: GetEntries - how to determine which bin is the last. (GetEntries = {0, 1, 2}, default = 0)\n"
116 " GetEntries == 0: find the rightmost non-zero bin, ignore trailing zero bins.\n"
117 " GetEntries == 1: take the return value of TH1::GetEntries() as the number of the last bin.\n"
118 " GetEntries == 2: take the rightmost bin as the last bin, regardless of the bin content.\n"
119 "Returned value: LastBinNumber - the bin number of the last checked (i. e. non-zero) bin.\n"
120 "Returned value: LastBinCenter - the centre of that bin on the horizontal axis.\n"
121 "Returned value: GreenExceeded - how many bins exceeded the green threshold.\n"
122 "Returned value: RedExceeded - how many bins exceeded the red threshold." << std::endl;
◆ m_getEntries
int dqm_algorithms::LastBinThreshold::m_getEntries {} |
|
private |
◆ m_greaterThan
bool dqm_algorithms::LastBinThreshold::m_greaterThan {} |
|
private |
◆ m_grn
double dqm_algorithms::LastBinThreshold::m_grn {} |
|
private |
◆ m_name
const std::string dqm_algorithms::LastBinThreshold::m_name |
|
private |
◆ m_nBinsToExceed
int dqm_algorithms::LastBinThreshold::m_nBinsToExceed {} |
|
private |
◆ m_nBinsToWatch
int dqm_algorithms::LastBinThreshold::m_nBinsToWatch {} |
|
private |
◆ m_red
double dqm_algorithms::LastBinThreshold::m_red {} |
|
private |
◆ m_valueThresholds
bool dqm_algorithms::LastBinThreshold::m_valueThresholds {} |
|
private |
The documentation for this class was generated from the following files: