#include <BlackBin.h>
Definition at line 18 of file BlackBin.h.
◆ BlackBin()
| dqm_algorithms::BlackBin::BlackBin |
( |
| ) |
|
Definition at line 23 of file BlackBin.cxx.
25{
26 dqm_core::AlgorithmManager::instance().registerAlgorithm("BlackBin", this);
27}
◆ clone()
◆ execute()
| dqm_core::Result * dqm_algorithms::BlackBin::execute |
( |
const std::string & | name, |
|
|
const TObject & | object, |
|
|
const dqm_core::AlgorithmConfig & | config ) |
Definition at line 38 of file BlackBin.cxx.
41{
43
44 if(
object.
IsA()->InheritsFrom(
"TH2" ) ) {
47 throw dqm_core::BadConfig( ERS_HERE, name, "dimension > 3 " );
48 }
49 } else {
50 throw dqm_core::BadConfig( ERS_HERE, name, "does not inherit from TH2" );
51 }
52
53
54
55
56
57 int xbin;
58 int ybin;
59 try {
62 }
63 catch ( dqm_core::Exception & ex ) {
64
65 throw dqm_core::BadConfig( ERS_HERE, name, ex.what(), ex );
66 }
67
68
69 double binContents=
histogram -> GetBinContent(xbin,ybin);
70
71 dqm_core::Result*
result =
new dqm_core::Result();
72 result->tags_[
"BinContent"] = binContents;
73 if(binContents>0){
74 result->status_ = dqm_core::Result::Disabled;
75 }
76 else {
77 result->status_ = dqm_core::Result::Green;
78 }
79
81}
#define IsA
Declare the TObject style functions.
◆ printDescription()
| void dqm_algorithms::BlackBin::printDescription |
( |
std::ostream & | out | ) |
|
Definition at line 84 of file BlackBin.cxx.
85{
86
87 out<<
"Black bin: Returns status -1 (black) if bin has no contents\n" << std::endl;
88
89 out<<
"Mandatory parameter: XBin: The label of the X bin that you would like to check\n"<<std::endl;
90
91 out<<
"Mandatory parameter: YBin: The label of the Y bin that you would like to check\n"<<std::endl;
92
93}
The documentation for this struct was generated from the following files: