64{
66
67
68 if(
object.
IsA()->InheritsFrom(
"TH1" ) ) {
70 if (
hist->GetDimension() >= 2 ){
71 throw dqm_core::BadConfig( ERS_HERE, name, "dimension >= 2 " );
72 }
73 } else {
74 throw dqm_core::BadConfig( ERS_HERE, name, "does not inherit from TH1" );
75 }
76
77
78 try {
84 }
85 catch ( dqm_core::Exception & ex ) {
86 throw dqm_core::BadConfig( ERS_HERE, name, ex.what(), ex );
87 }
88
89
91 throw dqm_core::BadConfig( ERS_HERE, name, "required parameter BinNum is not provided!" );
93 throw dqm_core::BadConfig( ERS_HERE, name, "required parameter Thresh is not provided!" );
94 }
95
96
98 throw dqm_core::BadConfig( ERS_HERE, name, "thresholds m_redTh and m_greenTh must be in the range [0,1]! Threshold(s) out of range." );
99 }
100
101
103 throw dqm_core::BadConfig( ERS_HERE, name, "m_redTh must be above or equal to m_greenTh!" );
104 }
105
106
108 ERS_INFO(
"Histogram does not satisfy MinStat requirement " <<
hist->GetName());
109 dqm_core::Result *
result =
new dqm_core::Result(dqm_core::Result::Undefined);
110 result->tags_[
"InsufficientEntries"] =
hist->GetEntries();
112 }
113 ERS_DEBUG(1,
"Statistics: "<<
hist->GetEntries()<<
" entries ");
114
115
116 dqm_core::Result*
result =
new dqm_core::Result();
118 if (percent == -1.){
120 }
121
122
124
126 result->status_ = dqm_core::Result::Green;
127 }
129 result->status_ = dqm_core::Result::Yellow;
130 }
131 else {
132 result->status_ = dqm_core::Result::Red;
133 }
134
135
137}
double calculatePercentage(const TH1 *hist, dqm_core::Result *result)
#define IsA
Declare the TObject style functions.