#include <CheckMean.h>
Definition at line 16 of file CheckMean.h.
◆ CheckMean()
dqm_algorithms::CheckMean::CheckMean |
( |
| ) |
|
◆ ~CheckMean()
dqm_algorithms::CheckMean::~CheckMean |
( |
| ) |
|
|
virtual |
◆ clone()
dqm_core::Algorithm * dqm_algorithms::CheckMean::clone |
( |
| ) |
|
|
virtual |
◆ execute()
Definition at line 54 of file CheckMean.cxx.
60 const TH1*
h =
dynamic_cast<const TH1*
>( &
data );
62 throw dqm_core::BadConfig( ERS_HERE,
name,
"Cannot cast data to type TH1" );
65 const TH1*
ref =
dynamic_cast<const TH1*
>(
config.getReference() );
67 throw dqm_core::BadConfig( ERS_HERE,
name,
"Cannot obtain reference of type TH1" );
71 const double mean_data =
h->GetMean();
72 const double mean_ref =
ref->GetMean();
74 const double mean_data_err =
h->GetMeanError();
75 const double mean_ref_err =
ref->GetMeanError();
80 const double s = ( mean_data - mean_ref );
81 const double s2 =
s*
s;
82 const double e2 = mean_data_err*mean_data_err + mean_ref_err*mean_ref_err;
92 if(
chi2 < chi2_warn ) {
95 else if(
chi2 < chi2_err ) {
96 status = dqm_core::Result::Yellow;
◆ getErrorLimit()
double dqm_algorithms::CheckMean::getErrorLimit |
( |
const dqm_core::AlgorithmConfig & |
config, |
|
|
std::string |
limitName |
|
) |
| |
|
protectedvirtual |
Definition at line 145 of file CheckMean.cxx.
148 std::map<std::string,double> rdmap =
config.getRedThresholds();
149 std::map<std::string,double>::const_iterator
i = rdmap.find(
limitName );
150 if(
i == rdmap.end() ) {
151 throw dqm_core::BadConfig( ERS_HERE,
limitName,
"Cannot find red threshold" );
◆ getWarningLimit()
double dqm_algorithms::CheckMean::getWarningLimit |
( |
const dqm_core::AlgorithmConfig & |
config, |
|
|
std::string |
limitName |
|
) |
| |
|
protectedvirtual |
Definition at line 131 of file CheckMean.cxx.
134 std::map<std::string,double> grmap =
config.getGreenThresholds();
135 std::map<std::string,double>::const_iterator
i = grmap.find(
limitName );
136 if(
i == grmap.end() ) {
137 throw dqm_core::BadConfig( ERS_HERE,
limitName,
"Cannot find green threshold" );
◆ printDescription()
void dqm_algorithms::CheckMean::printDescription |
( |
std::ostream & |
out | ) |
|
|
virtual |
Definition at line 108 of file CheckMean.cxx.
114 message +=
"Description: Checks the mean of a TH1 against the mean of a reference TH1\n";
115 message +=
" by assessing a chi2 defined by the two means and their errors\n";
116 message +=
"Parameters: none\n";
◆ m_limitName
std::string dqm_algorithms::CheckMean::m_limitName |
|
protected |
◆ m_name
std::string dqm_algorithms::CheckMean::m_name |
|
protected |
The documentation for this class was generated from the following files: