ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaPython
AthenaPython
PyAthenaTool.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
// PyAthenaTool.h
8
// Header file for class PyAthena::Tool
9
// Author: S.Binet<binet@cern.ch>
11
#ifndef ATHENAPYTHON_PYATHENATOOL_H
12
#define ATHENAPYTHON_PYATHENATOOL_H
13
14
// STL includes
15
#include <string>
16
17
// FrameWork includes
18
#include "
AthenaBaseComps/AthAlgTool.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
::AthAlgTool
ToolBase_t
;
30
class
ATLAS_NOT_THREAD_SAFE
Tool
31
:
public
extends<ToolBase_t, ::IPyComponent>
32
{
33
35
// Public methods:
37
public
:
38
39
// Copy constructor:
40
42
Tool
(
const
std::string&
type
,
43
const
std::string& name,
44
const
IInterface* parent );
45
47
virtual
~Tool
();
48
49
// Athena tool's Hooks
50
virtual
StatusCode
initialize
()
override
;
51
virtual
StatusCode
sysInitialize
()
override
;
52
virtual
StatusCode
finalize
()
override
;
53
54
59
virtual
const
char
*
typeName
()
const override
;
60
61
64
virtual
PyObject
*
self
()
override
{
return
m_self
; }
65
66
67
protected
:
68
71
virtual
bool
setPyAttr(
PyObject
* pyobj )
override
;
72
73
private
:
75
Tool
() =
delete
;
76
77
protected
:
78
80
PyObject
*
m_self
;
81
82
};
83
84
}
//> end namespace PyAthena
85
86
#endif
//> ATHENAPYTHON_PYATHENATOOL_H
AthAlgTool.h
IPyComponent.h
PyObject
_object PyObject
Definition
IPyComponent.h:27
checker_macros.h
Define macros for attributes used to control the static checker.
AthAlgTool
Definition
AthAlgTool.h:26
PyAthena::Tool::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
PyAthenaTool.cxx:100
PyAthena::Tool::sysInitialize
virtual StatusCode sysInitialize() override
Definition
PyAthenaTool.cxx:76
PyAthena::Tool::m_self
PyObject * m_self
Pointer to self (from the python world).
Definition
PyAthenaTool.h:80
PyAthena::Tool::self
virtual PyObject * self() override
return associated python object.
Definition
PyAthenaTool.h:64
PyAthena::Tool::Tool
Tool()=delete
Default constructor:
PyAthena::Tool::finalize
virtual StatusCode finalize() override
Definition
PyAthenaTool.cxx:69
PyAthena::Tool::Tool
Tool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
PyAthenaTool.cxx:36
PyAthena
Definition
IPyComponent.h:28
PyAthena::ToolBase_t
::AthAlgTool ToolBase_t
Definition
PyAthenaTool.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
type
Generated on
for ATLAS Offline Software by
1.17.0