ATLAS Offline Software
Loading...
Searching...
No Matches
MDTSummary.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
9#include <dqm_core/AlgorithmManager.h>
10
11
14{
15 m_thresholdRed = 10;
17 dqm_core::AlgorithmManager::instance().registerSummaryMaker("MDTSummary",this);
18}
19
25
26dqm_core::Result*
28 const dqm_core::Result&,
29 const dqm_core::ParametersMap& map)
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}
static dqm_algorithms::BinContentComp myInstance
file declares the dqm_algorithms::summary::NeutralSumamry class.
#define y
Declares the MDTSummary SummaryMaker.
Definition MDTSummary.h:27
virtual dqm_core::Result * execute(const std::string &, const dqm_core::Result &, const dqm_core::ParametersMap &map)
STL class.
int r
Definition globals.cxx:22