ATLAS Offline Software
Loading...
Searching...
No Matches
AlgorithmMemoryWrapper.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7
8
9#ifndef EVENT_LOOP__ALGORITHM_MEMORY_WRAPPER_H
10#define EVENT_LOOP__ALGORITHM_MEMORY_WRAPPER_H
11
12#include <EventLoop/Global.h>
13
15#include <Rtypes.h>
16#include <chrono>
17
18namespace EL
19{
42
44 {
47
48 public:
49
51 using clock_type = std::chrono::high_resolution_clock;
52
54 void testInvariant () const;
55
58
60 AlgorithmMemoryWrapper (std::unique_ptr<IAlgorithmWrapper>&& val_algorithm);
61
62
63
66
67 public:
68
69 virtual std::string_view getName () const override;
70
71 virtual bool hasName (const std::string& name) const override;
72
73 virtual std::unique_ptr<IAlgorithmWrapper> makeClone() const override;
74
75 virtual Algorithm *getLegacyAlg () override;
76
77 virtual StatusCode initialize (const AlgorithmWorkerData& workerData) override;
78
79 virtual StatusCode execute (const EventContext& ctx) override;
80
81 virtual StatusCode postExecute () override;
82
83 virtual StatusCode finalize () override;
84
85 virtual StatusCode fileExecute () override;
86
87 virtual StatusCode beginInputFile () override;
88
89 virtual StatusCode endInputFile () override;
90
91
92
95
96 private:
97
99 std::unique_ptr<IAlgorithmWrapper> m_algorithm;
100
102 std::vector<Long_t> m_mem_resident;
103 std::vector<Long_t> m_mem_virtual;
104
107
110 };
111}
112
113#endif
virtual StatusCode postExecute() override
call postExecute on the algorithm
std::unique_ptr< IAlgorithmWrapper > m_algorithm
the actual algorithm
std::vector< Long_t > m_mem_resident
the Memory Consumption for different calls
virtual std::unique_ptr< IAlgorithmWrapper > makeClone() const override
make a clone of this algorithm
virtual StatusCode finalize() override
call finalize on the algorithm
virtual StatusCode endInputFile() override
call endInputFile on the algorithm
std::chrono::high_resolution_clock clock_type
the clock we use for our Memory
std::vector< Long_t > m_mem_virtual
virtual StatusCode beginInputFile() override
call beginInputFile on the algorithm
virtual StatusCode execute(const EventContext &ctx) override
call execute on the algorithm
AlgorithmMemoryWrapper()
standard default constructor for serialization
void testInvariant() const
test the invariant of this object
virtual Algorithm * getLegacyAlg() override
get the legacy algorithm, if we wrap one
virtual bool hasName(const std::string &name) const override
whether this algorithm has the given name
virtual StatusCode fileExecute() override
call fileExecute on the algorithm
virtual std::string_view getName() const override
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)