10 #include <TObjArray.h>
11 #include <dqm_core/AlgorithmManager.h>
31 if(
object.
IsA()->InheritsFrom(
"TH1" ) ) {
34 throw dqm_core::BadConfig( ERS_HERE,
name,
"does not inherit from TH1" );
44 result->tags_[
"InsufficientEffectiveEntries"] =
histogram->GetEffectiveEntries();
48 TObject* ro =
config.getReference();
49 const TObject* firstReference=0;
50 TObject* secondReference=0;
53 }
catch ( dqm_core::Exception & ex ) {
54 throw dqm_core::BadRefHist(ERS_HERE,
name,
" Could not retreive reference");
58 const TH1* refhist =
dynamic_cast<const TH1*
>(firstReference);
60 throw dqm_core::BadRefHist( ERS_HERE,
"Dimension",
name );
63 if ((
histogram->GetDimension() != refhist->GetDimension()) || (
histogram->GetNbinsX() != refhist->GetNbinsX()) || (
histogram->GetNbinsY() != refhist->GetNbinsY()) || refhist->GetNbinsZ() !=
histogram->GetNbinsZ() ) {
64 throw dqm_core::BadRefHist( ERS_HERE,
"number of bins",
name );
84 double binContent =
histogram->GetBinContent(
i);
85 double refContent = refhist->GetBinContent(
i);
88 if(std::abs(binContent - refContent) < binErr && check_bin_err){
93 double diff = binContent - refContent;
94 double adiff = std::abs(
diff);
106 resulthisto->SetBinContent(
i, binContent);
107 if (publish &&
count< maxpublish){
114 result->object_ = (boost::shared_ptr<TObject>)(TObject*)(resulthisto);
119 if(
count >= rthreshold){
121 }
else if(
count <= gthreshold){
124 result->status_ = dqm_core::Result::Yellow;
133 out<<
"EfficiencyRefComp_: Compares each bin to the reference bin and calculates the difference. The difference for each bin is then compared to a threshold value. Different thresholds are supported for bins > ref and < ref."<<std::endl;