44{
46
47 if(
object.
IsA()->InheritsFrom(
"TH1" ) ) {
50 throw dqm_core::BadConfig( ERS_HERE, name, "dimension > 3 " );
51 }
52 } else {
53 throw dqm_core::BadConfig( ERS_HERE, name, "does not inherit from TH1" );
54 }
55
57
59 dqm_core::Result *
result =
new dqm_core::Result(dqm_core::Result::Undefined);
62 }
63
64
65
66 if (
m_name ==
"ModuleStatus_All_Bins_Filled" ) {
67 unsigned int nbinsX_filled = 0;
68 const unsigned int binsx =
histogram->GetNbinsX();
69
70
71 for (
unsigned int i(1);
i <= binsx; ++
i ) {
72
73
75 if ( content == 0) {
76
77
78
79 nbinsX_filled++;
80 }
81
82 }
83
84 if(
histogram->GetEffectiveEntries() == 0){
85
86 ERS_DEBUG(1,
"Histogram " <<
histogram->GetName()<<
" does not have all filled bins");
87 return new dqm_core::Result(dqm_core::Result::Disabled);
88
89 }
90
91
92 if(nbinsX_filled >0 && nbinsX_filled < binsx){
93 ERS_DEBUG(1,
"Histogram " <<
histogram->GetName()<<
" has empty bins");
94 return new dqm_core::Result(dqm_core::Result::Red);
95 }
96
97
98 ERS_DEBUG(1,
"Histogram " <<
histogram->GetName()<<
" has all filled bins");
99 return new dqm_core::Result(dqm_core::Result::Green);
100
101 }
102
103 else {
104 return new dqm_core::Result();
105 }
106
107
108}
#define IsA
Declare the TObject style functions.