36{
38 if(
object.
IsA()->InheritsFrom(
"TH1" )) {
41 throw dqm_core::BadConfig( ERS_HERE, name, "dimension > 2 " );
42 }
43 } else {
44 throw dqm_core::BadConfig( ERS_HERE, name, "does not inherit from TH1" );
45 }
46
48 ERS_DEBUG(2,"Minimum statistics required:"<<minstat);
49 if (
histogram->GetEffectiveEntries() < minstat ) {
50 dqm_core::Result *
result =
new dqm_core::Result(dqm_core::Result::Undefined);
51 result->tags_[
"InsufficientEffectiveEntries"] =
histogram->GetEffectiveEntries();
53 }
54 double gthresho,rthresho;
55 std::string thresholdname="JB";
56 if (
m_name ==
"Prob") thresholdname =
"P";
57 try {
60 }
61 catch ( dqm_core::Exception & ex ) {
62 throw dqm_core::BadConfig( ERS_HERE, name, ex.what(), ex );
63 }
64 ERS_DEBUG(2,"Green Threshold: "<<gthresho<<" Red: "<<rthresho);
65
66
67
71 double jb =
n/6*(
s*
s + (
k*
k)/4 );
72
73
74 double prob = TMath::Prob(
jb , 2 );
75 ERS_DEBUG(2,
" K="<<k<<
" S="<<s<<
" n="<<n<<
" jb="<<
jb<<
" prob="<<prob);
76
77
78 double testValue;
81
82 dqm_core::Result*
result =
new dqm_core::Result();
85 if ( TMath::IsNaN( testValue ) )
86 {
87 result->status_=dqm_core::Result::Undefined;
89 }
91 {
92 if ( testValue >= gthresho ) {
93 result->status_ = dqm_core::Result::Green;
94 } else if ( testValue > rthresho ) {
95 result->status_ = dqm_core::Result::Yellow;
96 } else {
97 result->status_ = dqm_core::Result::Red;
98 }
99 }
100 else
101 {
102 if ( testValue <= gthresho ) {
103 result->status_ = dqm_core::Result::Green;
104 } else if ( testValue < rthresho ) {
105 result->status_ = dqm_core::Result::Yellow;
106 } else {
107 result->status_ = dqm_core::Result::Red;
108 }
109 }
111}
static dqm_algorithms::JarqueBeraTest jb("JB")
#define IsA
Declare the TObject style functions.