17 #include "dqm_core/exceptions.h"
18 #include "dqm_core/AlgorithmConfig.h"
19 #include "dqm_core/AlgorithmManager.h"
20 #include "dqm_core/Result.h"
35 : m_name(
"CTP_AllBinsAreEmptyExceptZero")
54 if(
object.
IsA()->InheritsFrom(
"TH1" )) {
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 );
75 std::map<std::string,double>
tags;
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 )
91 tags[
"# Bad bins"] = badBins;
106 message +=
"Description: Check that the only non-empty bin is the one centered in zero.\n";