15 #include "dqm_core/exceptions.h"
16 #include "dqm_core/AlgorithmConfig.h"
18 #include "dqm_core/AlgorithmManager.h"
19 #include "dqm_core/Result.h"
34 : m_name(
"AlgCountsBinsGreaterThan")
56 execute(
const std::string&
name,
const TObject&
object,
const dqm_core::AlgorithmConfig&
config)
60 if(
object.
IsA()->InheritsFrom(
"TH1" ) ) {
63 throw dqm_core::BadConfig( ERS_HERE,
name,
"dimension > 2 " );
66 throw dqm_core::BadConfig( ERS_HERE,
name,
"does not inherit from TH1" );
80 catch ( dqm_core::Exception & ex ) {
81 throw dqm_core::BadConfig( ERS_HERE,
name, ex.what(), ex );
92 int binSize = binEnd-binStart+1;
96 for(
int i=0;
i<binSize;
i++) {
97 int binx = binStart+
i;
99 for (
int j = 1; j <= nbiny; ++j ) {
107 ERS_DEBUG(1,
"Number of entries for bins is "<<
count );
108 ERS_DEBUG(1,
"Green: "<< gmin <<
" entries; Red: " << rmin <<
" entries ");
114 if (
count >= gmin ) {
116 }
else if (
count > rmin ) {
117 result->status_ = dqm_core::Result::Yellow;
135 message +=
"Description: Counts the number of listed bins with entries above CountsTh\n";
136 message +=
"Parameters: BinStart first bin to be checked (1=first bin)\n";
137 message +=
" BinEnd last bin to be checked (nbin=last bin)\n";
138 message +=
" CountsTh thresholds on bin counts \n";
139 message +=
" Nentries Red/Green";