ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaPython
AthenaPython
PyAthenaAlg.h
Go to the documentation of this file.
1
2
3
/*
4
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
// PyAthenaAlg.h
8
// Header file for class PyAthena::Alg
9
// Author: S.Binet<binet@cern.ch>
11
#ifndef ATHENAPYTHON_PYATHENAALG_H
12
#define ATHENAPYTHON_PYATHENAALG_H
13
14
// STL includes
15
#include <string>
16
17
// FrameWork includes
18
#include "
AthenaBaseComps/AthAlgorithm.h
"
19
#include "
AthenaPython/IPyComponent.h
"
20
#include "
CxxUtils/checker_macros.h
"
21
22
// Forward declaration
23
// Python
24
struct
_object;
25
typedef
_object
PyObject
;
26
27
namespace
PyAthena
{
28
29
typedef
::AthAlgorithm
AlgBase_t
;
30
31
class
ATLAS_NOT_THREAD_SAFE
Alg
:
virtual
public
::IPyComponent
,
32
public
AlgBase_t
33
{
35
// Public methods:
37
public
:
38
40
Alg
(
const
std::string& name, ISvcLocator* pSvcLocator );
41
43
virtual
~Alg
();
44
45
// Framework's Hooks
46
virtual
StatusCode
initialize
()
override
;
47
virtual
StatusCode
reinitialize
()
override
;
48
virtual
StatusCode
start
()
override
;
49
virtual
StatusCode
execute
(
const
EventContext& ctx)
override
;
50
virtual
StatusCode
stop
()
override
;
51
virtual
StatusCode
finalize
()
override
;
52
53
virtual
StatusCode
sysInitialize
()
override
;
54
56
// Const methods:
58
63
virtual
const
char
*
typeName
()
const override
;
64
66
// Non-const methods:
68
71
virtual
PyObject
*
self
()
override
{
return
m_self
; }
72
74
// Protected methods:
76
protected
:
77
80
virtual
bool
setPyAttr(
PyObject
* pyobj )
override
;
81
83
// Private data:
85
private
:
86
88
Alg
();
89
91
// Protected data:
93
protected
:
94
96
PyObject
*
m_self
;
97
98
};
99
100
101
}
//> end namespace PyAthena
102
103
#endif
//> ATHENAPYTHON_PYATHENAALG_H
AthAlgorithm.h
IPyComponent.h
PyObject
_object PyObject
Definition
IPyComponent.h:27
checker_macros.h
Define macros for attributes used to control the static checker.
AthAlgorithm
Base class from which non-reentrant (not thread-safe) Athena algorithm classes should be derived.
Definition
AthAlgorithm.h:27
IPyComponent
Definition
IPyComponent.h:31
PyAthena::Alg::reinitialize
virtual StatusCode reinitialize() override
Definition
PyAthenaAlg.cxx:67
PyAthena::Alg::self
virtual PyObject * self() override
return associated python object.
Definition
PyAthenaAlg.h:71
PyAthena::Alg::Alg
Alg(const std::string &name, ISvcLocator *pSvcLocator)
Constructor:
Definition
PyAthenaAlg.cxx:40
PyAthena::Alg::m_self
PyObject * m_self
Pointer to self (from the python world).
Definition
PyAthenaAlg.h:96
PyAthena::Alg::stop
virtual StatusCode stop() override
Definition
PyAthenaAlg.cxx:80
PyAthena::Alg::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition
PyAthenaAlg.cxx:104
PyAthena::Alg::typeName
virtual const char * typeName() const override
return the std::type_info name of the underlying py-component This is used by concrete implementation...
Definition
PyAthenaAlg.cxx:131
PyAthena::Alg::start
virtual StatusCode start() override
Definition
PyAthenaAlg.cxx:74
PyAthena::Alg::Alg
Alg()
Default constructor:
PyAthena::Alg::execute
virtual StatusCode execute(const EventContext &ctx) override
Execute method.
Definition
PyAthenaAlg.cxx:93
PyAthena::Alg::finalize
virtual StatusCode finalize() override
Definition
PyAthenaAlg.cxx:86
PyAthena
Definition
IPyComponent.h:28
PyAthena::AlgBase_t
::AthAlgorithm AlgBase_t
Definition
PyAthenaAlg.h:29
PyAthena::ATLAS_NOT_THREAD_SAFE
StatusCode callPyMethod ATLAS_NOT_THREAD_SAFE(PyObject *self, const char *method, PyObject *arg=nullptr)
call the python method
initialize
void initialize()
Definition
run_EoverP.cxx:894
Generated on
for ATLAS Offline Software by
1.17.0