ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
D3PDTools
EventLoop
EventLoop
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
14
#include <
AnaAlgorithm/IAlgorithmWrapper.h
>
15
#include <Rtypes.h>
16
17
namespace
EL
18
{
41
42
class
AlgorithmMemoryWrapper
final :
public
IAlgorithmWrapper
43
{
46
47
public
:
48
50
void
testInvariant
()
const
;
51
53
AlgorithmMemoryWrapper
() {};
54
56
AlgorithmMemoryWrapper
(std::unique_ptr<IAlgorithmWrapper>&& val_algorithm);
57
58
59
62
63
public
:
64
65
virtual
std::string_view
getName
()
const override
;
66
67
virtual
bool
hasName
(
const
std::string& name)
const override
;
68
69
virtual
std::unique_ptr<IAlgorithmWrapper>
makeClone
()
const override
;
70
71
virtual
Algorithm
*
getLegacyAlg
()
override
;
72
73
virtual
StatusCode
initialize
(
const
AlgorithmWorkerData
& workerData)
override
;
74
75
virtual
StatusCode
execute
(
const
EventContext& ctx)
override
;
76
77
virtual
StatusCode
postExecute
()
override
;
78
79
virtual
StatusCode
finalize
()
override
;
80
81
virtual
StatusCode
fileExecute
()
override
;
82
83
virtual
StatusCode
beginInputFile
()
override
;
84
85
virtual
StatusCode
endInputFile
()
override
;
86
87
88
91
92
private
:
93
95
std::unique_ptr<IAlgorithmWrapper>
m_algorithm
;
96
98
std::vector<Long_t>
m_mem_resident
;
99
std::vector<Long_t>
m_mem_virtual
;
100
101
Long_t
m_preMem_resident
= 0;
102
Long_t
m_preMem_virtual
= 0;
103
104
StatusCode
recordPreMemory
();
105
StatusCode
recordPostMemory
();
106
};
107
}
108
109
#endif
Global.h
IAlgorithmWrapper.h
EL::AlgorithmMemoryWrapper::postExecute
virtual StatusCode postExecute() override
call postExecute on the algorithm
Definition
AlgorithmMemoryWrapper.cxx:111
EL::AlgorithmMemoryWrapper::recordPostMemory
StatusCode recordPostMemory()
Definition
AlgorithmMemoryWrapper.cxx:206
EL::AlgorithmMemoryWrapper::m_algorithm
std::unique_ptr< IAlgorithmWrapper > m_algorithm
the actual algorithm
Definition
AlgorithmMemoryWrapper.h:95
EL::AlgorithmMemoryWrapper::m_mem_resident
std::vector< Long_t > m_mem_resident
the Memory Consumption for different calls
Definition
AlgorithmMemoryWrapper.h:98
EL::AlgorithmMemoryWrapper::makeClone
virtual std::unique_ptr< IAlgorithmWrapper > makeClone() const override
make a clone of this algorithm
Definition
AlgorithmMemoryWrapper.cxx:63
EL::AlgorithmMemoryWrapper::recordPreMemory
StatusCode recordPreMemory()
Definition
AlgorithmMemoryWrapper.cxx:189
EL::AlgorithmMemoryWrapper::finalize
virtual StatusCode finalize() override
call finalize on the algorithm
Definition
AlgorithmMemoryWrapper.cxx:125
EL::AlgorithmMemoryWrapper::endInputFile
virtual StatusCode endInputFile() override
call endInputFile on the algorithm
Definition
AlgorithmMemoryWrapper.cxx:175
EL::AlgorithmMemoryWrapper::m_mem_virtual
std::vector< Long_t > m_mem_virtual
Definition
AlgorithmMemoryWrapper.h:99
EL::AlgorithmMemoryWrapper::m_preMem_resident
Long_t m_preMem_resident
Definition
AlgorithmMemoryWrapper.h:101
EL::AlgorithmMemoryWrapper::m_preMem_virtual
Long_t m_preMem_virtual
Definition
AlgorithmMemoryWrapper.h:102
EL::AlgorithmMemoryWrapper::beginInputFile
virtual StatusCode beginInputFile() override
call beginInputFile on the algorithm
Definition
AlgorithmMemoryWrapper.cxx:161
EL::AlgorithmMemoryWrapper::execute
virtual StatusCode execute(const EventContext &ctx) override
call execute on the algorithm
Definition
AlgorithmMemoryWrapper.cxx:97
EL::AlgorithmMemoryWrapper::AlgorithmMemoryWrapper
AlgorithmMemoryWrapper()
standard default constructor for serialization
Definition
AlgorithmMemoryWrapper.h:53
EL::AlgorithmMemoryWrapper::testInvariant
void testInvariant() const
test the invariant of this object
Definition
AlgorithmMemoryWrapper.cxx:29
EL::AlgorithmMemoryWrapper::getLegacyAlg
virtual Algorithm * getLegacyAlg() override
get the legacy algorithm, if we wrap one
Definition
AlgorithmMemoryWrapper.cxx:74
EL::AlgorithmMemoryWrapper::hasName
virtual bool hasName(const std::string &name) const override
whether this algorithm has the given name
Definition
AlgorithmMemoryWrapper.cxx:54
EL::AlgorithmMemoryWrapper::fileExecute
virtual StatusCode fileExecute() override
call fileExecute on the algorithm
Definition
AlgorithmMemoryWrapper.cxx:147
EL::AlgorithmMemoryWrapper::getName
virtual std::string_view getName() const override
Definition
AlgorithmMemoryWrapper.cxx:45
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