ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
DataQuality
dqm_algorithms
summary
WorstWBlackSummary.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
8
#include <dqm_core/AlgorithmManager.h>
9
#include <dqm_core/Result.h>
10
#include <dqm_core/Parameter.h>
11
#include <
dqm_algorithms/summary/WorstWBlackSummary.h
>
12
13
static
dqm_algorithms::summary::WorstWBlackSummary
myInstance
;
14
15
dqm_algorithms::summary::WorstWBlackSummary::WorstWBlackSummary
()
16
{
17
dqm_core::AlgorithmManager::instance().registerSummaryMaker(
"WorstWBlackSummary"
,
this
);
18
}
19
20
dqm_algorithms::summary::WorstWBlackSummary::~WorstWBlackSummary
()
21
{
22
}
23
24
dqm_algorithms::summary::WorstWBlackSummary
*
25
dqm_algorithms::summary::WorstWBlackSummary::clone
()
26
{
27
return
new
WorstWBlackSummary
();
28
}
29
30
dqm_core::Result*
31
dqm_algorithms::summary::WorstWBlackSummary::execute
(
const
std::string & ,
32
const
dqm_core::Result &,
33
const
dqm_core::ParametersMap &
map
)
34
{
35
dqm_core::ParametersMap::const_iterator iter;
36
unsigned
int
black=0;
37
unsigned
int
red
=0;
38
unsigned
int
yellow
=0;
39
unsigned
int
green
=0;
40
unsigned
int
undefined
= 0;
41
unsigned
int
skipped = 0;
42
43
for
(iter=
map
.begin();iter!=
map
.end();++iter){
44
//If weight is 0 skip this result. Allow to "turn off"
45
// results in summary makers
46
if
( iter->second->getWeight() == 0 )
47
{
48
ERS_DEBUG(2,
"Skip result (weight 0): "
<<iter->first);
49
++skipped;
50
continue
;
51
}
52
dqm_core::Result::Status status=iter->second->getResult().get()->status_;
53
if
(status==dqm_core::Result::Disabled) {
54
++black;
55
}
else
if
(status==dqm_core::Result::Red) {
56
++
red
;
57
}
else
if
(status==dqm_core::Result::Yellow) {
58
++
yellow
;
59
}
else
if
(status==dqm_core::Result::Green) {
60
++
green
;
61
}
else
{
62
++
undefined
;
63
}
64
}
65
66
dqm_core::Result *newresult =
new
dqm_core::Result();
67
if
( black > 0) {
68
newresult->status_=dqm_core::Result::Disabled;
69
}
else
if
(
red
> 0 ) {
70
newresult->status_=dqm_core::Result::Red;
71
}
else
if
(
yellow
> 0 ) {
72
newresult->status_=dqm_core::Result::Yellow;
73
}
else
if
(
green
> 0 ) {
74
newresult->status_=dqm_core::Result::Green;
75
}
else
{
76
newresult->status_=dqm_core::Result::Undefined;
77
}
78
newresult->tags_.insert(std::make_pair(
"NumBlack"
,(
double
)black));
79
newresult->tags_.insert(std::make_pair(
"NumRed"
,(
double
)
red
));
80
newresult->tags_.insert(std::make_pair(
"NumYellow"
,(
double
)
yellow
));
81
newresult->tags_.insert(std::make_pair(
"NumGreen"
,(
double
)
green
));
82
newresult->tags_.insert(std::make_pair(
"NumUndefined"
,(
double
)
undefined
));
83
newresult->tags_.insert(std::make_pair(
"NumExcluded"
,(
double
)skipped));
84
return
newresult;
85
}
86
myInstance
static dqm_algorithms::AutoencoderExampleAlgorithm myInstance
Definition
AutoencoderExampleAlgorithm.cxx:30
green
@ green
Definition
BinsDiffFromStripMedian.h:18
red
@ red
Definition
BinsDiffFromStripMedian.h:18
yellow
@ yellow
Definition
BinsDiffFromStripMedian.h:18
HitType::undefined
@ undefined
Definition
FPGATrackSimHit.h:39
WorstWBlackSummary.h
file declares the dqm_algorithms::summary::WorstWBlackSummary class.
map
STL class.
dqm_algorithms::summary::WorstWBlackSummary
A simple summary This summary maker calculates result for a region as the worst result of childs.
Definition
WorstWBlackSummary.h:30
dqm_algorithms::summary::WorstWBlackSummary::WorstWBlackSummary
WorstWBlackSummary()
Definition
WorstWBlackSummary.cxx:15
dqm_algorithms::summary::WorstWBlackSummary::clone
WorstWBlackSummary * clone()
Definition
WorstWBlackSummary.cxx:25
dqm_algorithms::summary::WorstWBlackSummary::execute
dqm_core::Result * execute(const std::string &, const dqm_core::Result &, const dqm_core::ParametersMap &)
Definition
WorstWBlackSummary.cxx:31
dqm_algorithms::summary::WorstWBlackSummary::~WorstWBlackSummary
~WorstWBlackSummary()
Definition
WorstWBlackSummary.cxx:20
Generated on
for ATLAS Offline Software by
1.17.0