#include <AFP_ToFEfficiency.h>
Definition at line 21 of file AFP_ToFEfficiency.h.
◆ AFP_ToFEfficiency()
| dqm_algorithms::AFP_ToFEfficiency::AFP_ToFEfficiency |
( |
| ) |
|
Definition at line 21 of file AFP_ToFEfficiency.cxx.
21 {
22 dqm_core::AlgorithmManager::instance().registerAlgorithm( "AFP_ToFEfficiency", this );
23}
◆ ~AFP_ToFEfficiency()
| dqm_algorithms::AFP_ToFEfficiency::~AFP_ToFEfficiency |
( |
| ) |
|
◆ clone()
◆ execute()
| dqm_core::Result * dqm_algorithms::AFP_ToFEfficiency::execute |
( |
const std::string & | name, |
|
|
const TObject & | object, |
|
|
const dqm_core::AlgorithmConfig & | config ) |
|
override |
Definition at line 34 of file AFP_ToFEfficiency.cxx.
36 {
37 if ( !
object.
IsA()->InheritsFrom(
"TH2" ) ) {
38 throw dqm_core::BadConfig( ERS_HERE, name, "does not inherit from TH2" );
39 }
40
42
46
48 for (uint32_t i = 1;
i < 5; ++
i)
49 {
51 if (current_eff >= eff_limit)
52 each_tr_status[0]++;
53 else
54 each_tr_status[1]++;
55 }
56
57 auto result =
new dqm_core::Result();
58
59
60 result->tags_[ (
"N Trains with efficiency less than " + (std::to_string(eff_limit)).substr(0,4)).c_str() ] = each_tr_status[1];
61
62 if ( each_tr_status[0]==0 && each_tr_status[1]==0 )
63 result->status_ = dqm_core::Result::Undefined;
64 else if ( each_tr_status[0] == 4 )
65 result->status_ = dqm_core::Result::Green;
66 else if ( each_tr_status[1] >= gthreshold && each_tr_status[1] < rthreshold )
67 result->status_ = dqm_core::Result::Yellow;
68 else
69 result->status_ = dqm_core::Result::Red;
70
72}
#define IsA
Declare the TObject style functions.
◆ printDescriptionTo()
| void dqm_algorithms::AFP_ToFEfficiency::printDescriptionTo |
( |
std::ostream & | out | ) |
|
|
override |
Definition at line 74 of file AFP_ToFEfficiency.cxx.
74 {
75 out <<
"AFP_ToFEfficiency: Print out how many trains have efficiency less than limit\n"
76 << "Required Parameter: eff_limit: threshold percentage of efficiency" << std::endl;
77}
The documentation for this class was generated from the following files: