ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
dqm_algorithms::summary::MDTSummary Class Reference

#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::Resultexecute (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 
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  {
57  }
58  // otherwise the status remains undefined, as constructed above
59  return result;
60 }

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:
beamspotman.r
def r
Definition: beamspotman.py:676
Undefined
@ Undefined
Definition: MaterialTypes.h:8
get_generator_info.result
result
Definition: get_generator_info.py:21
instance
std::map< std::string, double > instance
Definition: Run_To_Get_Tags.h:8
Result
ICscStripFitter::Result Result
Definition: CalibCscStripFitter.cxx:13
dqm_algorithms::summary::MDTSummary::m_thresholdYellow
float m_thresholdYellow
Definition: MDTSummary.h:34
python.handimod.Green
int Green
Definition: handimod.py:524
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
python.handimod.Red
Red
Definition: handimod.py:551
dqm_algorithms::summary::MDTSummary::MDTSummary
MDTSummary()
Definition: MDTSummary.cxx:13
y
#define y
Athena::Status
Status
Athena specific StatusCode values.
Definition: AthStatusCode.h:22
dqm_algorithms::summary::MDTSummary::m_thresholdRed
float m_thresholdRed
Definition: MDTSummary.h:33