Namespace for all classes interfacing Gaudi to Python.
More...
Namespace for all classes interfacing Gaudi to Python.
GaudiPython.h GaudiPython/GaudiPython.h
The general namespace to hide all Gaudi-python related classes
- Author
- Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@l.nosp@m.app..nosp@m.in2p3.nosp@m..fr
- Date
- 2005-08-04
◆ Matrix
◆ Row
◆ Vector
useful type definition for implicit loos
Definition at line 28 of file Vector.h.
◆ call_python_method() [1/2]
StatusCode GaudiPython::call_python_method |
( |
PyObject * |
self, |
|
|
const char * |
method |
|
) |
| |
call the python method
Definition at line 48 of file Algorithm.cpp.
54 PyObject* r = PyObject_CallMethod(
self, chr( method ),
nullptr );
61 if ( PyInt_Check( r ) ) {
69 PyObject*
c = PyObject_CallMethod( r, chr(
"getCode" ),
nullptr );
73 }
else if ( PyLong_Check(
c ) ) {
78 msg +=
"().getCode()' ";
79 PyErr_SetString( PyExc_TypeError,
msg.c_str() );
◆ call_python_method() [2/2]
int GaudiPython::call_python_method |
( |
PyObject * |
self, |
|
|
const char * |
method, |
|
|
char * |
buf |
|
) |
| |
call a python method with a string as an argument
Definition at line 22 of file CallbackStreamBuf.cpp.
23 if ( !
self || !method ) {
return 1; }
24 PyObject* r = PyObject_CallMethod(
self,
const_cast<char*
>( method ),
const_cast<char*
>(
"s" ), buf );
26 std::string err(
"Unsuccessful call to bound Python method" );
28 PyErr_SetString( PyExc_TypeError, err.c_str() );