#include <BinContentDump.h>
Definition at line 14 of file BinContentDump.h.
◆ BinContentDump()
| dqm_algorithms::BinContentDump::BinContentDump |
( |
| ) |
|
Definition at line 22 of file BinContentDump.cxx.
23{
24 dqm_core::AlgorithmManager::instance().registerAlgorithm("BinContentDump", this);
25}
◆ ~BinContentDump()
| dqm_algorithms::BinContentDump::~BinContentDump |
( |
| ) |
|
◆ clone()
◆ execute()
| dqm_core::Result * dqm_algorithms::BinContentDump::execute |
( |
const std::string & | name, |
|
|
const TObject & | object, |
|
|
const dqm_core::AlgorithmConfig & | config ) |
Definition at line 36 of file BinContentDump.cxx.
37{
39
40 if (
object.
IsA()->InheritsFrom(
"TH1")) {
43 throw dqm_core::BadConfig(ERS_HERE, name, "dimension > 2");
44 }
45 } else {
46 throw dqm_core::BadConfig(ERS_HERE, name, "does not inherit from TH1");
47 }
48
51
52
54 dqm_core::Result *
result =
new dqm_core::Result(dqm_core::Result::Undefined);
57 }
58
59 dqm_core::Result *
result =
new dqm_core::Result(dqm_core::Result::Green);
60
62 const double binContent =
histogram->GetBinContent(i);
63 const double binError =
histogram->GetBinError(i);
65
66
69 if ((binThreshold !=
undefined) && (binContent < binThreshold))
result->status_ = dqm_core::Result::Red;
70
72 std::ostringstream oss;
75 }
76
77 if (publishType & 0x01)
result->tags_[
label] = binContent;
78 if (publishType & 0x02)
result->tags_[
label +
"Error"] = binError;
79 }
81}
std::string label(const std::string &format, int i)
#define IsA
Declare the TObject style functions.
◆ printDescription()
| void dqm_algorithms::BinContentDump::printDescription |
( |
std::ostream & | out | ) |
|
|
virtual |
Definition at line 82 of file BinContentDump.cxx.
83{
84 out <<
"BinContentDump: Dumps the contents of all bins, labelled either with their bin label or with \"Bin_N\". Returns green status.\n"
85 "Optional parameters: <label>: The bin with this label must be greater than the given value, otherwise the algorithm returns red status.\n"
86 "Optional parameter: PublishType: What to publish. 0 = nothing, 1 = bin contents (default), 2 = bin errors, 3 = both\n"
87 "Thresholds: None." << std::endl;
88}
The documentation for this struct was generated from the following files: