ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
D3PDTools
EventLoop
EventLoop
AlgorithmTimerWrapper.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
7
8
9
#ifndef EVENT_LOOP__ALGORITHM_TIMER_WRAPPER_H
10
#define EVENT_LOOP__ALGORITHM_TIMER_WRAPPER_H
11
12
#include <
EventLoop/Global.h
>
13
14
#include <
AnaAlgorithm/IAlgorithmWrapper.h
>
15
#include <chrono>
16
17
namespace
EL
18
{
25
26
class
AlgorithmTimerWrapper
final :
public
IAlgorithmWrapper
27
{
30
31
public
:
32
34
using
clock_type
= std::chrono::high_resolution_clock;
35
37
void
testInvariant
()
const
;
38
40
AlgorithmTimerWrapper
() {};
41
43
AlgorithmTimerWrapper
(std::unique_ptr<IAlgorithmWrapper>&& val_algorithm);
44
45
46
49
50
public
:
51
52
virtual
std::string_view
getName
()
const override
;
53
54
virtual
bool
hasName
(
const
std::string& name)
const override
;
55
56
virtual
std::unique_ptr<IAlgorithmWrapper>
makeClone
()
const override
;
57
58
virtual
Algorithm
*
getLegacyAlg
()
override
;
59
60
virtual
StatusCode
initialize
(
const
AlgorithmWorkerData
& workerData)
override
;
61
62
virtual
StatusCode
execute
(
const
EventContext& ctx)
override
;
63
64
virtual
StatusCode
postExecute
()
override
;
65
66
virtual
StatusCode
finalize
()
override
;
67
68
virtual ::StatusCode
fileExecute
()
override
;
69
70
virtual ::StatusCode
beginInputFile
()
override
;
71
72
virtual ::StatusCode
endInputFile
()
override
;
73
74
75
78
79
private
:
80
82
std::unique_ptr<IAlgorithmWrapper>
m_algorithm
;
83
85
clock_type::duration
m_time_global
{};
86
clock_type::duration
m_time_file
{};
87
clock_type::duration
m_time_event
{};
88
};
89
}
90
91
#endif
Global.h
IAlgorithmWrapper.h
EL::AlgorithmTimerWrapper::m_time_global
clock_type::duration m_time_global
the timers for different calls
Definition
AlgorithmTimerWrapper.h:85
EL::AlgorithmTimerWrapper::getName
virtual std::string_view getName() const override
Definition
AlgorithmTimerWrapper.cxx:43
EL::AlgorithmTimerWrapper::fileExecute
virtual::StatusCode fileExecute() override
call fileExecute on the algorithm
Definition
AlgorithmTimerWrapper.cxx:145
EL::AlgorithmTimerWrapper::finalize
virtual StatusCode finalize() override
call finalize on the algorithm
Definition
AlgorithmTimerWrapper.cxx:126
EL::AlgorithmTimerWrapper::m_algorithm
std::unique_ptr< IAlgorithmWrapper > m_algorithm
the actual algorithm
Definition
AlgorithmTimerWrapper.h:82
EL::AlgorithmTimerWrapper::clock_type
std::chrono::high_resolution_clock clock_type
the clock we use for our timer
Definition
AlgorithmTimerWrapper.h:34
EL::AlgorithmTimerWrapper::postExecute
virtual StatusCode postExecute() override
call postExecute on the algorithm
Definition
AlgorithmTimerWrapper.cxx:111
EL::AlgorithmTimerWrapper::m_time_event
clock_type::duration m_time_event
Definition
AlgorithmTimerWrapper.h:87
EL::AlgorithmTimerWrapper::makeClone
virtual std::unique_ptr< IAlgorithmWrapper > makeClone() const override
make a clone of this algorithm
Definition
AlgorithmTimerWrapper.cxx:61
EL::AlgorithmTimerWrapper::endInputFile
virtual::StatusCode endInputFile() override
call endInputFile on the algorithm
Definition
AlgorithmTimerWrapper.cxx:175
EL::AlgorithmTimerWrapper::hasName
virtual bool hasName(const std::string &name) const override
whether this algorithm has the given name
Definition
AlgorithmTimerWrapper.cxx:52
EL::AlgorithmTimerWrapper::m_time_file
clock_type::duration m_time_file
Definition
AlgorithmTimerWrapper.h:86
EL::AlgorithmTimerWrapper::AlgorithmTimerWrapper
AlgorithmTimerWrapper()
standard default constructor for serialization
Definition
AlgorithmTimerWrapper.h:40
EL::AlgorithmTimerWrapper::beginInputFile
virtual::StatusCode beginInputFile() override
call beginInputFile on the algorithm
Definition
AlgorithmTimerWrapper.cxx:160
EL::AlgorithmTimerWrapper::execute
virtual StatusCode execute(const EventContext &ctx) override
call execute on the algorithm
Definition
AlgorithmTimerWrapper.cxx:96
EL::AlgorithmTimerWrapper::getLegacyAlg
virtual Algorithm * getLegacyAlg() override
get the legacy algorithm, if we wrap one
Definition
AlgorithmTimerWrapper.cxx:72
EL::AlgorithmTimerWrapper::testInvariant
void testInvariant() const
test the invariant of this object
Definition
AlgorithmTimerWrapper.cxx:27
EL::Algorithm
Definition
Algorithm.h:22
EL::IAlgorithmWrapper
a wrapper around a generic algorithm for use within EventLoop
Definition
IAlgorithmWrapper.h:50
EL
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Definition
AsgComponentFactories.h:16
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
initialize
void initialize()
Definition
run_EoverP.cxx:894
EL::AlgorithmWorkerData
all the external components an algorithm needs before initialization (in EventLoop)
Definition
AlgorithmWorkerData.h:34
Generated on
for ATLAS Offline Software by
1.17.0