1 #ifndef GAUDIPYTHON_CALLBACKSTREAMBUF_H
2 #define GAUDIPYTHON_CALLBACKSTREAMBUF_H
9 #include "GaudiPython/GaudiPython.h"
10 #include "GaudiKernel/Kernel.h"
17 class GAUDI_API CallbackStreamBuf:
public std::stringbuf
23 PyObject_t( PyObject *obj =
nullptr) : m_obj( obj ) {
if (m_obj) Py_INCREF(m_obj); }
24 ~PyObject_t() {
if (m_obj) Py_DECREF(m_obj); }
25 PyObject *
get() {
return m_obj; }
28 std::array<char,512> m_callbackBuff;
31 CallbackStreamBuf(PyObject*
self);
GAUDI_API StatusCode call_python_method(PyObject *self, const char *method)
call the python method
GaudiPython.h GaudiPython/GaudiPython.h.