Classes | |
struct | RegulatorCleanup |
A TObject-derived class to inject the memory regulation logic in the ROOT list of cleanups. More... | |
class | RPyROOTApplication |
Interactive application for Python. More... | |
Functions | |
PyObject * | AddCPPInstancePickling (PyObject *self, PyObject *args) |
Set reduce attribute for CPPInstance objects. | |
PyObject * | AddPrettyPrintingPyz (PyObject *self, PyObject *args) |
Add pretty printing pythonization. | |
PyObject * | AddTClassDynamicCastPyz (PyObject *self, PyObject *args) |
Add pythonization for TClass::DynamicCast. | |
PyObject * | AddTObjectEqNePyz (PyObject *self, PyObject *args) |
Add pythonization for equality and inequality operators in TObject. | |
PyObject * | BranchPyz (PyObject *self, PyObject *args) |
Add pythonization for TTree::Branch. | |
void | CallCppyyRecursiveRemove (TObject *object) |
Get the class id of the TObject being deleted and run Cppyy's RecursiveRemove. | |
PyObject * | CPPInstanceExpand (PyObject *self, PyObject *args) |
Deserialize pickled objects. | |
PyObject * | GetBranchAttr (PyObject *self, PyObject *args) |
PyObject * | RegisterConverterAlias (PyObject *, PyObject *args) |
PyObject * | RegisterExecutorAlias (PyObject *, PyObject *args) |
Variables | |
PyObject * | gRootModule = nullptr |
Set reduce attribute for CPPInstance objects.
[in] | self | Always null, since this is a module function. |
[in] | args | Pointer to a Python tuple object containing the arguments received from Python. |
The C++ function op_reduce defined above is wrapped in a Python method so that it can be injected in CPPInstance
Definition at line 123 of file CPPInstancePyz.cxx.
Add pretty printing pythonization.
[in] | self | Always null, since this is a module function. |
[in] | args | Pointer to a Python tuple object containing the arguments received from Python. |
This function adds the following pythonizations to print the object more user-friendly than cppyy by using the output of cling::printValue as the return value of the special method str.
Definition at line 119 of file GenericPyz.cxx.
Add pythonization for TClass::DynamicCast.
[in] | self | Always null, since this is a module function. |
[in] | args | Pointer to a Python tuple object containing the arguments received from Python. |
TClass::DynamicCast returns a void* that the user still has to cast (it will have the proper offset, though). Fix this by providing the requested binding if the cast succeeded.
Definition at line 68 of file TClassPyz.cxx.
Add pythonization for equality and inequality operators in TObject.
[in] | self | Always null, since this is a module function. |
[in] | args | Pointer to a Python tuple object containing the arguments received from Python. |
The equality and inequality operators are better implemented in C++, since we need to need to rely on Cppyy's rich comparison if the object we are comparing ourselves with is not a Python proxy or if it contains a null pointer. For example, we need to support the comparison to None.
The rest of comparison operators (i.e. those that define order) can be implemented in Python, throwing a NotImplemented exception if we are not comparing two proxies to TObject or derivate.
Definition at line 81 of file TObjectPyz.cxx.
Add pythonization for TTree::Branch.
[in] | self | Always null, since this is a module function. |
[in] | args | Pointer to a Python tuple object containing the arguments received from Python. |
Modify the behaviour of Branch so that proxy references can be passed as arguments from the Python side, more precisely in cases where the C++ implementation of the method expects the address of a pointer.
For example:
The following signatures are treated in this pythonization:
Definition at line 361 of file TTreePyz.cxx.
void PyROOT::CallCppyyRecursiveRemove | ( | TObject * | object | ) |
Get the class id of the TObject being deleted and run Cppyy's RecursiveRemove.
[in] | object | Object being destructed. |
Definition at line 73 of file TMemoryRegulator.cxx.
Deserialize pickled objects.
[in] | self | Always null, since this is a module function. |
[in] | args | Pointer to a Python tuple object containing the arguments received from Python. |
Helper function that deserializes pickled objects. It needs to be included in the extension module API because otherwise it is not callable from Python. This is important because it will be Python itself calling it when trying to expand a serialized object.
Definition at line 38 of file CPPInstancePyz.cxx.
Definition at line 177 of file TTreePyz.cxx.
Definition at line 40 of file PyROOTModule.cxx.
Definition at line 52 of file PyROOTModule.cxx.
PyObject * PyROOT::gRootModule = nullptr |
Definition at line 38 of file PyROOTModule.cxx.