27 const TObject &
object,
28 const dqm_core::AlgorithmConfig &
config)
33 if(
object.
IsA()->InheritsFrom(
"TH1" ) ) {
36 throw dqm_core::BadConfig( ERS_HERE, name,
"does not inherit from TH1" );
42 int refBinX=-1, refBinY=-1, refBinZ=-1;
48 catch ( dqm_core::Exception & ex ) {
49 throw dqm_core::BadConfig( ERS_HERE, name, ex.what(), ex );
55 dqm_core::Result *
result =
new dqm_core::Result(dqm_core::Result::Undefined);
61 int maxBinX=-1, maxBinY=-1, maxBinZ=-1;
62 histogram->GetMaximumBin(maxBinX,maxBinY,maxBinZ);
65 dqm_core::Result*
result =
new dqm_core::Result();
66 result->tags_[
"MaxBin_xIndex"] = maxBinX;
67 if (dim>1)
result->tags_[
"MaxBin_yIndex"] = maxBinY;
68 if (dim>2)
result->tags_[
"MaxBin_zIndex"] = maxBinZ;
71 bool match = (maxBinX == refBinX);
72 if (dim>1)
match &= (maxBinY == refBinY);
73 if (dim>2)
match &= (maxBinZ == refBinZ);
76 if (
match)
result->status_ = dqm_core::Result::Green;
77 else result->status_ = dqm_core::Result::Red;
static dqm_algorithms::BinContentComp myInstance