ATLAS Offline Software
Loading...
Searching...
No Matches
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
21
22// Forward declaration
23// Python
24struct _object;
25typedef _object PyObject;
26
27namespace PyAthena {
28
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
81
82};
83
84} //> end namespace PyAthena
85
86#endif //> ATHENAPYTHON_PYATHENATOOL_H
_object PyObject
Define macros for attributes used to control the static checker.
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 sysInitialize() override
PyObject * m_self
Pointer to self (from the python world)
virtual PyObject * self() override
return associated python object.
Tool()=delete
Default constructor:
virtual StatusCode finalize() override
Tool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
::AthAlgTool ToolBase_t
StatusCode callPyMethod ATLAS_NOT_THREAD_SAFE(PyObject *self, const char *method, PyObject *arg=nullptr)
call the python method
void initialize()