44{
45 const TGraph * graph;
46
47 if(
object.
IsA()->InheritsFrom(
"TGraph" ) ) {
48 graph =
static_cast<const TGraph*
>(&
object);
49 } else {
50 throw dqm_core::BadConfig( ERS_HERE, name, "does not inherit from TGraph" );
51 }
52
54
55 if (graph->GetN() < minstat ) {
56 dqm_core::Result *
result =
new dqm_core::Result(dqm_core::Result::Undefined);
57 result->tags_[
"InsufficientN"] = graph->GetN();
59 }
60
61 if (
m_name ==
"Graph_Not_Empty") {
62 if (graph->GetN() != 0) {
63 ERS_DEBUG(1, "Graph " <<graph->GetName()<<" is Not Empty");
64 return new dqm_core::Result(dqm_core::Result::Green);
65 }else {
66 ERS_DEBUG(1, "Graph " <<graph->GetName()<<" is Empty");
67 return new dqm_core::Result(dqm_core::Result::Red);
68 }
69 }
else if (
m_name ==
"Graph_Empty") {
70 if (graph->GetN() == 0) {
71 ERS_DEBUG(1, "Graph " <<graph->GetName()<<" is Empty");
72 return new dqm_core::Result(dqm_core::Result::Green);
73 }else {
74 ERS_DEBUG(1, "Graph " <<graph->GetName()<<" is Not Empty");
75 return new dqm_core::Result(dqm_core::Result::Red);
76 }
77 } else {
78 return new dqm_core::Result();
79 }
80
81
82}
#define IsA
Declare the TObject style functions.