SND@LHC Software
Loading...
Searching...
No Matches
pyFairModule.h File Reference
#include "FairModule.h"
#include <stdexcept>
Include dependency graph for pyFairModule.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  pyFairModule
 

Typedefs

typedef _object PyObject
 

Functions

void call_python_method (PyObject *self, const char *method)
 

Typedef Documentation

◆ PyObject

typedef _object PyObject

Definition at line 2 of file pyFairModule.h.

Function Documentation

◆ call_python_method()

void call_python_method ( PyObject self,
const char *  method 
)

Definition at line 5 of file pyFairModule.cxx.

6{
7 // check arguments
8 if ( 0 == self || 0 == method ) { throw std::runtime_error("Invalid Python object and method"); }
9 // call Python
10 PyObject* r = PyObject_CallMethod(self, const_cast<char*>(method), const_cast<char*>(""));
11 if ( 0 == r ) { PyErr_Print(); return;}
12 // release used objects
13 Py_XDECREF( r ) ;
14 //
15 return;
16}
_object PyObject
Definition pyFairModule.h:2