ATLAS Offline Software
Loading...
Searching...
No Matches
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
15#include <chrono>
16
17namespace EL
18{
25
27 {
30
31 public:
32
34 using clock_type = std::chrono::high_resolution_clock;
35
37 void testInvariant () const;
38
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 () 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
clock_type::duration m_time_global
the timers for different calls
virtual std::string_view getName() const override
virtual::StatusCode fileExecute() override
call fileExecute on the algorithm
virtual StatusCode finalize() override
call finalize on the algorithm
std::unique_ptr< IAlgorithmWrapper > m_algorithm
the actual algorithm
std::chrono::high_resolution_clock clock_type
the clock we use for our timer
virtual StatusCode postExecute() override
call postExecute on the algorithm
virtual StatusCode execute() override
call execute on the algorithm
clock_type::duration m_time_event
virtual std::unique_ptr< IAlgorithmWrapper > makeClone() const override
make a clone of this algorithm
virtual::StatusCode endInputFile() override
call endInputFile on the algorithm
virtual bool hasName(const std::string &name) const override
whether this algorithm has the given name
clock_type::duration m_time_file
AlgorithmTimerWrapper()
standard default constructor for serialization
virtual::StatusCode beginInputFile() override
call beginInputFile on the algorithm
virtual Algorithm * getLegacyAlg() override
get the legacy algorithm, if we wrap one
void testInvariant() const
test the invariant of this object
a wrapper around a generic algorithm for use within EventLoop
This module defines the arguments passed from the BATCH driver to the BATCH worker.
::StatusCode StatusCode
StatusCode definition for legacy code.
void initialize()
all the external components an algorithm needs before initialization (in EventLoop)