43 const TObject &
object,
44 const dqm_core::AlgorithmConfig &
config )
48 if(
object.
IsA()->InheritsFrom(
"TH1" ) ) {
51 throw dqm_core::BadConfig( ERS_HERE, name,
"dimension > 2 " );
54 throw dqm_core::BadConfig( ERS_HERE, name,
"does not inherit from TH1" );
63 dqm_core::Result *
result =
new dqm_core::Result(dqm_core::Result::Undefined);
70 const_cast<TAxis*
>(
histogram->GetXaxis())->SetRange(range[0], range[1]);
71 const_cast<TAxis*
>(
histogram->GetYaxis())->SetRange(range[2], range[3]);
73 std::map<std::string, double> params;
75 params[
"XMean"]=
histogram->GetMean(1) - subtractfromxmean;
76 params[
"YMean"]=
histogram->GetMean(2) - subtractfromymean;
77 ERS_DEBUG(1,
"XMean Value " <<
histogram->GetMean(1)<<
" YMean Value " <<
histogram->GetMean(2));
78 }
else if (
m_name ==
"RMS" ) {
81 ERS_DEBUG(1,
"XRMS Value " <<
histogram->GetRMS(1)<<
" YRMS Value "<<
histogram->GetRMS(2));
83 return new dqm_core::Result();
91 catch ( dqm_core::Exception & ex ) {
92 throw dqm_core::BadConfig( ERS_HERE, name, ex.what(), ex );
96 if (publishType & 0x01)
result->tags_[
"XMean"] = params[
"XMean"];
97 if (publishType & 0x02)
result->tags_[
"YMean"] = params[
"YMean"];
98 }
else if (
m_name ==
"RMS") {
99 if (publishType & 0x01)
result->tags_[
"XRMS"] = params[
"XRMS"];
100 if (publishType & 0x02)
result->tags_[
"YRMS"] = params[
"YRMS"];