ATLAS Offline Software
Loading...
Searching...
No Matches
dqm_algorithms::summary::MDTSummary Class Reference

Declares the MDTSummary SummaryMaker. More...

#include <MDTSummary.h>

Inheritance diagram for dqm_algorithms::summary::MDTSummary:
Collaboration diagram for dqm_algorithms::summary::MDTSummary:

Public Member Functions

 MDTSummary ()
MDTSummaryclone ()
virtual dqm_core::Result * execute (const std::string &, const dqm_core::Result &, const dqm_core::ParametersMap &map)

Private Attributes

float m_thresholdRed
float m_thresholdYellow

Detailed Description

Declares the MDTSummary SummaryMaker.

Information about number of Red/Green/Yellow is attached to tags of the result

Definition at line 26 of file MDTSummary.h.

Constructor & Destructor Documentation

◆ MDTSummary()

dqm_algorithms::summary::MDTSummary::MDTSummary ( )

Definition at line 13 of file MDTSummary.cxx.

14{
15 m_thresholdRed = 10;
17 dqm_core::AlgorithmManager::instance().registerSummaryMaker("MDTSummary",this);
18}

Member Function Documentation

◆ clone()

dqm_algorithms::summary::MDTSummary * dqm_algorithms::summary::MDTSummary::clone ( )

Definition at line 21 of file MDTSummary.cxx.

22{
23 return new MDTSummary();
24}

◆ execute()

dqm_core::Result * dqm_algorithms::summary::MDTSummary::execute ( const std::string & ,
const dqm_core::Result & ,
const dqm_core::ParametersMap & map )
virtual

Definition at line 27 of file MDTSummary.cxx.

30{
31 int y = 0 , r = 0;
32 dqm_core::ParametersMap::const_iterator iter = map.begin();
33 for ( ; iter != map.end() ; ++iter)
34 {
35 dqm_core::Result::Status mystatus = iter->second->getResult().get()->status_;
36 if (mystatus == dqm_core::Result::Red) { ++r; }
37 else if (mystatus == dqm_core::Result::Yellow) { ++y; }
38 }
39 const double n_problems = (double)r + 0.5*(double)y;
40
41 dqm_core::Result* result = new dqm_core::Result(dqm_core::Result::Undefined);
42 result->tags_["NYellows"] = y;
43 result->tags_["NReds"] = r;
44 result->tags_["RedThresh"] = m_thresholdRed;
45 result->tags_["YellowThresh"] = m_thresholdYellow;
46 if ( n_problems > m_thresholdRed)
47 {
48 result->status_ = dqm_core::Result::Red;
49 }
50 else if (n_problems > m_thresholdYellow)
51 {
52 result->status_ = dqm_core::Result::Yellow;
53 }
54 else
55 {
56 result->status_ = dqm_core::Result::Green;
57 }
58 // otherwise the status remains undefined, as constructed above
59 return result;
60}
#define y
int r
Definition globals.cxx:22

Member Data Documentation

◆ m_thresholdRed

float dqm_algorithms::summary::MDTSummary::m_thresholdRed
private

Definition at line 33 of file MDTSummary.h.

◆ m_thresholdYellow

float dqm_algorithms::summary::MDTSummary::m_thresholdYellow
private

Definition at line 34 of file MDTSummary.h.


The documentation for this class was generated from the following files: