ATLAS Offline Software
Loading...
Searching...
No Matches
PyAthenaSvc.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// PyAthenaSvc.h
8// Header file for class PyAthena::Svc
9// Author: S.Binet<binet@cern.ch>
11#ifndef ATHENAPYTHON_PYATHENASVC_H
12#define ATHENAPYTHON_PYATHENASVC_H
13
14// STL includes
15#include <string>
16
17// FrameWork includes
18#include "GaudiKernel/IIncidentListener.h"
22
23// Forward declaration
24// Python
25struct _object;
26typedef _object PyObject;
27
28namespace PyAthena {
29
32 : public extends<SvcBase_t, ::IPyComponent, ::IIncidentListener>
33{
34
36 // Public methods:
38 public:
39
40 // Copy constructor:
41
43 Svc( const std::string& name, ISvcLocator* svcLocator );
44
46 virtual ~Svc();
47
49
50 virtual StatusCode initialize() override;
51 virtual StatusCode reinitialize() override;
52 virtual StatusCode start() override;
53 virtual StatusCode stop() override;
54 virtual StatusCode finalize() override;
56
57 virtual StatusCode sysInitialize() override;
58
59
64 const char* typeName() const override;
65
68 virtual PyObject* self() override { return m_self; }
69
72 virtual void handle( const Incident& incident ) override;
73
74
75 protected:
76
79 virtual bool setPyAttr( PyObject* pyobj ) override;
80
81
82 private:
84 Svc() = delete;
85
86 protected:
87
90
91};
92
93} //> end namespace PyAthena
94
95#endif //> ATHENAPYTHON_PYATHENASVC_H
_object PyObject
Define macros for attributes used to control the static checker.
PyObject * m_self
Pointer to self (from the python world)
Definition PyAthenaSvc.h:89
virtual StatusCode finalize() override
virtual StatusCode start() override
virtual StatusCode reinitialize() override
virtual StatusCode sysInitialize() override
Svc(const std::string &name, ISvcLocator *svcLocator)
Constructor with parameters:
virtual StatusCode stop() override
Svc()=delete
Default constructor:
virtual PyObject * self() override
return associated python object.
Definition PyAthenaSvc.h:68
const char * typeName() const override
return the std::type_info name of the underlying py-component This is used by concrete implementation...
::AthService SvcBase_t
Definition PyAthenaSvc.h:30
StatusCode callPyMethod ATLAS_NOT_THREAD_SAFE(PyObject *self, const char *method, PyObject *arg=nullptr)
call the python method
void initialize()