ATLAS Offline Software
Loading...
Searching...
No Matches
PyAthenaAlg.h
Go to the documentation of this file.
1
2
3/*
4 Copyright (C) 2002-2019 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
21
22// Forward declaration
23// Python
24struct _object;
25typedef _object PyObject;
26
27namespace PyAthena {
28
30
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() 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
97
98};
99
100
101} //> end namespace PyAthena
102
103#endif //> ATHENAPYTHON_PYATHENAALG_H
_object PyObject
Define macros for attributes used to control the static checker.
Base class from which all concrete Athena algorithm classes should be derived.
virtual StatusCode reinitialize() override
virtual PyObject * self() override
return associated python object.
Definition PyAthenaAlg.h:71
Alg(const std::string &name, ISvcLocator *pSvcLocator)
Constructor:
PyObject * m_self
Pointer to self (from the python world)
Definition PyAthenaAlg.h:96
virtual StatusCode stop() override
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual const char * typeName() const override
return the std::type_info name of the underlying py-component This is used by concrete implementation...
virtual StatusCode start() override
virtual StatusCode execute() override
Alg()
Default constructor:
virtual StatusCode finalize() override
::AthAlgorithm AlgBase_t
Definition PyAthenaAlg.h:29
StatusCode callPyMethod ATLAS_NOT_THREAD_SAFE(PyObject *self, const char *method, PyObject *arg=nullptr)
call the python method
void initialize()