Logo ROOT   6.12/07
Reference Guide
Namespaces | Macros | Typedefs | Functions | Variables
Executors.cxx File Reference
#include "PyROOT.h"
#include "PyStrings.h"
#include "Executors.h"
#include "ObjectProxy.h"
#include "TPyBufferFactory.h"
#include "RootWrapper.h"
#include "Utility.h"
#include "TClassEdit.h"
#include <cstring>
#include <utility>
#include <sstream>
Include dependency graph for Executors.cxx:

Namespaces

 PyROOT
 

Macros

#define PYROOT_EXECUTOR_FACTORY(name)
 
#define PYROOT_IMPL_GILCALL(rtype, tcode)
 
#define PYROOT_IMPLEMENT_ARRAY_EXECUTOR(name, type)
 
#define PYROOT_IMPLEMENT_BASIC_REFEXECUTOR(name, type, stype, F1, F2)
 

Typedefs

typedef std::map< std::string, ExecutorFactory_t > PyROOT::ExecFactories_t
 
typedef TExecutor *(* PyROOT::ExecutorFactory_t) ()
 

Functions

static Cppyy::TCppObject_t GILCallConstructor (Cppyy::TCppMethod_t method, Cppyy::TCppType_t klass, PyROOT::TCallContext *ctxt)
 
static Cppyy::TCppObject_t GILCallO (Cppyy::TCppMethod_t method, Cppyy::TCppObject_t self, PyROOT::TCallContext *ctxt, Cppyy::TCppType_t klass)
 
 PYROOT_IMPLEMENT_BASIC_REFEXECUTOR (LongLong, Long64_t, Long64_t, PyLong_FromLongLong, PyLong_AsLongLong) PYROOT_IMPLEMENT_BASIC_REFEXECUTOR(ULongLong
 
PyLongOrInt_AsULong64 PYROOT_IMPLEMENT_BASIC_REFEXECUTOR (LongDouble, LongDouble_t, LongDouble_t, PyFloat_FromDouble, PyFloat_AsDouble) PyObject *PyROOT
 execute <method> with argument <self, ctxt>, return python string return value More...
 
static PyObjectPyROOT_PyBool_FromInt (Int_t b)
 
static PyObjectPyROOT_PyUnicode_FromInt (Int_t c)
 

Variables

ExecFactories_t PyROOT::gExecFactories
 
 PyLong_FromUnsignedLongLong
 
 ULong64_t
 

Macro Definition Documentation

◆ PYROOT_EXECUTOR_FACTORY

#define PYROOT_EXECUTOR_FACTORY (   name)
Value:
TExecutor* Create##name##Executor() \
{ \
return new T##name##Executor; \
}
double T(double x)
Definition: ChebyshevPol.h:34
char name[80]
Definition: TGX11.cxx:109

Definition at line 745 of file Executors.cxx.

◆ PYROOT_IMPL_GILCALL

#define PYROOT_IMPL_GILCALL (   rtype,
  tcode 
)
Value:
static inline rtype GILCall##tcode( \
GILControl gc( ctxt ); \
return Cppyy::Call##tcode( method, self, &ctxt->fArgs ); \
}
std::vector< TParameter > fArgs
Definition: TCallContext.h:57
ptrdiff_t TCppMethod_t
Definition: Cppyy.h:15
void * TCppObject_t
Definition: Cppyy.h:14

Definition at line 56 of file Executors.cxx.

◆ PYROOT_IMPLEMENT_ARRAY_EXECUTOR

#define PYROOT_IMPLEMENT_ARRAY_EXECUTOR (   name,
  type 
)
Value:
PyObject* PyROOT::T##name##ArrayExecutor::Execute( \
{ \
return BufFac_t::Instance()->PyBuffer_FromMemory( (type*)GILCallR( method, self, ctxt ) );\
}
double T(double x)
Definition: ChebyshevPol.h:34
ptrdiff_t TCppMethod_t
Definition: Cppyy.h:15
void * TCppObject_t
Definition: Cppyy.h:14
int type
Definition: TGX11.cxx:120
char name[80]
Definition: TGX11.cxx:109
_object PyObject
Definition: TPyArg.h:20

Definition at line 359 of file Executors.cxx.

◆ PYROOT_IMPLEMENT_BASIC_REFEXECUTOR

#define PYROOT_IMPLEMENT_BASIC_REFEXECUTOR (   name,
  type,
  stype,
  F1,
  F2 
)
Value:
PyObject* PyROOT::T##name##RefExecutor::Execute( \
{ \
type* ref = (type*)GILCallR( method, self, ctxt ); \
if ( ! fAssignable ) \
return F1( (stype)*ref ); \
else { \
*ref = (type)F2( fAssignable ); \
Py_DECREF( fAssignable ); \
fAssignable = 0; \
Py_INCREF( Py_None ); \
return Py_None; \
} \
}
double T(double x)
Definition: ChebyshevPol.h:34
#define F1(x, y, z)
Definition: TMD5.cxx:267
ptrdiff_t TCppMethod_t
Definition: Cppyy.h:15
#define F2(x, y, z)
Definition: TMD5.cxx:268
void * TCppObject_t
Definition: Cppyy.h:14
int type
Definition: TGX11.cxx:120
char name[80]
Definition: TGX11.cxx:109
_object PyObject
Definition: TPyArg.h:20

Definition at line 261 of file Executors.cxx.

Function Documentation

◆ GILCallConstructor()

static Cppyy::TCppObject_t GILCallConstructor ( Cppyy::TCppMethod_t  method,
Cppyy::TCppType_t  klass,
PyROOT::TCallContext ctxt 
)
inlinestatic

Definition at line 82 of file Executors.cxx.

◆ GILCallO()

static Cppyy::TCppObject_t GILCallO ( Cppyy::TCppMethod_t  method,
Cppyy::TCppObject_t  self,
PyROOT::TCallContext ctxt,
Cppyy::TCppType_t  klass 
)
inlinestatic

Definition at line 76 of file Executors.cxx.

◆ PYROOT_IMPLEMENT_BASIC_REFEXECUTOR() [1/2]

PYROOT_IMPLEMENT_BASIC_REFEXECUTOR ( LongLong  ,
Long64_t  ,
Long64_t  ,
PyLong_FromLongLong  ,
PyLong_AsLongLong   
)

◆ PYROOT_IMPLEMENT_BASIC_REFEXECUTOR() [2/2]

PyLongOrInt_AsULong64 PYROOT_IMPLEMENT_BASIC_REFEXECUTOR ( LongDouble  ,
LongDouble_t  ,
LongDouble_t  ,
PyFloat_FromDouble  ,
PyFloat_AsDouble   
)

execute <method> with argument <self, ctxt>, return python string return value

Definition at line 292 of file Executors.cxx.

◆ PyROOT_PyBool_FromInt()

static PyObject* PyROOT_PyBool_FromInt ( Int_t  b)
inlinestatic

Definition at line 94 of file Executors.cxx.

◆ PyROOT_PyUnicode_FromInt()

static PyObject* PyROOT_PyUnicode_FromInt ( Int_t  c)
inlinestatic

Definition at line 88 of file Executors.cxx.

Variable Documentation

◆ PyLong_FromUnsignedLongLong

PyLong_FromUnsignedLongLong

Definition at line 289 of file Executors.cxx.

◆ ULong64_t

Definition at line 289 of file Executors.cxx.