54 if(
object.
IsA()->InheritsFrom(
"TH1" )) {
55 hist =
static_cast<const TH1*
>( &
object );
56 if (hist->GetDimension() > 1 ){
57 throw dqm_core::BadConfig( ERS_HERE, name,
"dimension > 1 " );
60 throw dqm_core::BadConfig( ERS_HERE, name,
"does not inherit from TH1" );
69 catch ( dqm_core::Exception & ex ) {
70 throw dqm_core::BadConfig( ERS_HERE, name, ex.what(), ex );
74 dqm_core::Result*
result =
new dqm_core::Result();
75 std::map<std::string,double>
tags;
78 result->status_ = dqm_core::Result::Green;
79 int nbinsx = hist->GetXaxis()->GetNbins();
82 for(
int iBin = 1; iBin <= nbinsx-1; ++iBin)
85 if( hist->GetBinContent(iBin) >
threshold && hist->GetBinLowEdge(iBin) * hist->GetBinLowEdge(iBin+1) > 0 )
87 result->status_ = dqm_core::Result::Red;
91 tags[
"# Bad bins"] = badBins;