ATLAS Offline Software
Public Member Functions | List of all members
dqm_algorithms::summary::SimpleSummary Struct Reference

#include <SimpleSummary.h>

Inheritance diagram for dqm_algorithms::summary::SimpleSummary:
Collaboration diagram for dqm_algorithms::summary::SimpleSummary:

Public Member Functions

 SimpleSummary ()
 
 ~SimpleSummary ()
 
SimpleSummaryclone ()
 
dqm_core::Resultexecute (const std::string &, const dqm_core::Result &result, const dqm_core::ParametersMap &)
 

Detailed Description

Definition at line 19 of file SimpleSummary.h.

Constructor & Destructor Documentation

◆ SimpleSummary()

dqm_algorithms::summary::SimpleSummary::SimpleSummary ( )

Definition at line 21 of file SimpleSummary.cxx.

21  {
22  dqm_core::AlgorithmManager::instance().registerSummaryMaker( "SimpleSummary", this );
23 }

◆ ~SimpleSummary()

dqm_algorithms::summary::SimpleSummary::~SimpleSummary ( )

Definition at line 25 of file SimpleSummary.cxx.

25  {
26 }

Member Function Documentation

◆ clone()

dqm_algorithms::summary::SimpleSummary * dqm_algorithms::summary::SimpleSummary::clone ( )

Definition at line 29 of file SimpleSummary.cxx.

29  {
30  return new SimpleSummary();
31 }

◆ execute()

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

Definition at line 34 of file SimpleSummary.cxx.

36  {
37 
38  dqm_core::ParametersMap::const_iterator iter;
39 
40  float rweight = 0;
41  float yweight = 0;
42  float gweight = 0;
43 
44  float ngrey = 0;
45  float nblack = 0;
46 
47  for (iter=map.begin();iter!=map.end();++iter){
48 
49  dqm_core::Result::Status status=iter->second->getResult().get()->status_;
50 
51  if ( status == dqm_core::Result::Red ) {
52  rweight+=iter->second->getWeight();
53  }else if ( status == dqm_core::Result::Yellow ) {
54  yweight+=iter->second->getWeight();
55  }else if ( status == dqm_core::Result::Green ) {
56  gweight+=iter->second->getWeight();
57  }else if ( status == dqm_core::Result::Undefined ) {
58  ++ngrey;
59  }else if ( status==dqm_core::Result::Disabled ) {
60  ++nblack;
61  }
62  }
63 
64 
65  dqm_core::Result *newresult = new dqm_core::Result();
66 
67  if ( nblack == map.size() ) {
68  newresult->status_=dqm_core::Result::Disabled;
69  return newresult;
70  }
71  if ( ( ngrey + nblack ) == map.size() ) {
72  newresult->status_=dqm_core::Result::Undefined;
73  return newresult;
74  }
75 
76  float weight = gweight > ((rweight >= yweight) ? rweight : yweight) ? gweight : ((rweight >= yweight) ? rweight : yweight);
77 
78  if ( weight == 0 ) {
79  newresult->status_=dqm_core::Result::Undefined;
80  return newresult;
81  }
82 
83  if ( weight == rweight ) {
84  newresult->status_=dqm_core::Result::Red;
85  }else if ( weight == yweight ) {
86  newresult->status_=dqm_core::Result::Yellow;
87  } else {
88  newresult->status_=dqm_core::Result::Green;
89  }
90 
91  return newresult;
92 
93 }

The documentation for this struct was generated from the following files:
Undefined
@ Undefined
Definition: MaterialTypes.h:8
dqm_algorithms::summary::SimpleSummary::SimpleSummary
SimpleSummary()
Definition: SimpleSummary.cxx:21
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
instance
std::map< std::string, double > instance
Definition: Run_To_Get_Tags.h:8
Result
ICscStripFitter::Result Result
Definition: CalibCscStripFitter.cxx:13
python.handimod.Green
int Green
Definition: handimod.py:524
python.handimod.Red
Red
Definition: handimod.py:551
Athena::Status
Status
Athena specific StatusCode values.
Definition: AthStatusCode.h:22
merge.status
status
Definition: merge.py:17