ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigCost
TrigCostAnalysis
src
monitors
MonitorGlobal.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
MonitorGlobal.h
"
6
#include "
../counters/CounterGlobal.h
"
7
8
MonitorGlobal::MonitorGlobal
(
const
std::string& name,
const
MonitoredRange
* parent)
9
:
MonitorBase
(name, parent) {
10
}
11
12
StatusCode
MonitorGlobal::newEvent
(
const
CostData
& data,
const
float
weight) {
13
14
std::stringstream
ss
;
15
ss
<<
"LumiBlock_"
<< std::setfill(
'0'
) << std::setw(5) << data.lb();
16
const
size_t
incrementWalltime = ( data.liveTimeIsPerEvent() or !
counterExists
(
ss
.str()) ) ? 1 : 0;
17
18
ATH_CHECK
(
getCounter
(
ss
.str())->
newEvent
(data, incrementWalltime, weight) );
19
ATH_CHECK
(
getCounter
(
"Total"
)->
newEvent
(data, incrementWalltime, weight) );
20
21
return
StatusCode::SUCCESS;
22
}
23
24
25
std::unique_ptr<CounterBase>
MonitorGlobal::newCounter
(
const
std::string& name) {
26
return
std::make_unique<CounterGlobal>(name,
this
);
27
}
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
CounterGlobal.h
ss
static Double_t ss
Definition
LArPhysWaveHECTool.cxx:37
MonitorGlobal.h
CostData
Caches and propagates event data to be used by monitoring algorithms.
Definition
CostData.h:26
CounterBase::newEvent
virtual StatusCode newEvent(const CostData &data, size_t index, float weight=1.0)=0
Pure virtual interface called by Monitor to instruct this Counter to perform its analysis.
MonitorBase::getCounter
CounterBase * getCounter(const std::string &name)
Retrieve counter by name.
Definition
Trigger/TrigCost/TrigCostAnalysis/src/MonitorBase.cxx:52
MonitorBase::MonitorBase
MonitorBase()=delete
Forbid default constructor.
MonitorBase::counterExists
bool counterExists(const std::string &name) const
Check if a counter of a given name exists.
Definition
Trigger/TrigCost/TrigCostAnalysis/src/MonitorBase.cxx:47
MonitorGlobal::newCounter
virtual std::unique_ptr< CounterBase > newCounter(const std::string &name) override
Concrete counter instantiation.
Definition
MonitorGlobal.cxx:25
MonitorGlobal::MonitorGlobal
MonitorGlobal()=delete
Forbid default constructor.
MonitorGlobal::newEvent
virtual StatusCode newEvent(const CostData &data, const float weight=1.) override
Concrete dispatch method.
Definition
MonitorGlobal.cxx:12
MonitoredRange
Container which represents a time range and holds a collection of Monitors which monitor this range.
Definition
MonitoredRange.h:29
Generated on
for ATLAS Offline Software by
1.17.0