#include "PyROOT.h"
#include "PyStrings.h"
#include "Pythonize.h"
#include "ObjectProxy.h"
#include "MethodProxy.h"
#include "RootWrapper.h"
#include "Utility.h"
#include "PyCallable.h"
#include "PyBufferFactory.h"
#include "FunctionHolder.h"
#include "Converters.h"
#include "MemoryRegulator.h"
#include "Adapters.h"
#include "TClass.h"
#include "TMethod.h"
#include "TCollection.h"
#include "TDirectory.h"
#include "TSeqCollection.h"
#include "TClonesArray.h"
#include "TObject.h"
#include "TFunction.h"
#include "TError.h"
#include "TTree.h"
#include "TBranch.h"
#include "TLeaf.h"
#include "Api.h"
#include <stdexcept>
#include <string>
#include <stdio.h>
#include <utility>
Go to the source code of this file.
#define PYROOT_IMPLEMENT_STRING_PYTHONIZATION | ( | name, | |||
func | ) |
Value:
PyObject* name##StringRepr( PyObject* self ) \ { \ PyObject* data = CallPyObjMethod( self, #func ); \ PyObject* repr = PyROOT_PyUnicode_FromFormat( "\'%s\'", PyROOT_PyUnicode_AsString( data ) ); \ Py_DECREF( data ); \ return repr; \ } \ \ PyObject* name##StringIsEqual( PyObject* self, PyObject* obj ) \ { \ PyObject* data = CallPyObjMethod( self, #func ); \ PyObject* result = PyObject_RichCompare( data, obj, Py_EQ ); \ Py_DECREF( data ); \ if ( ! result ) \ return 0; \ return result; \ } \ \ PyObject* name##StringIsNotEqual( PyObject* self, PyObject* obj ) \ { \ PyObject* data = CallPyObjMethod( self, #func ); \ PyObject* result = PyObject_RichCompare( data, obj, Py_NE ); \ Py_DECREF( data ); \ if ( ! result ) \ return 0; \ return result; \ }
Definition at line 883 of file Pythonize.cxx.
#define PYROOT_IMPLEMENT_STRING_PYTHONIZATION_CMP | ( | name, | |||
func | ) |
Value:
PyObject* name##StringCompare( PyObject* self, PyObject* obj ) \ { \ PyObject* data = CallPyObjMethod( self, #func ); \ int result = PyObject_Compare( data, obj ); \ Py_DECREF( data ); \ if ( PyErr_Occurred() ) \ return 0; \ return PyInt_FromLong( result ); \ } \ \ PYROOT_IMPLEMENT_STRING_PYTHONIZATION( name, func )
Definition at line 914 of file Pythonize.cxx.
Definition at line 75 of file Pythonize.cxx.
References result().
Referenced by CallSelfIndex(), CheckedGetItem(), DeRefGetAttr(), FollowGetAttr(), GenObjectIsEqual(), GenObjectIsNotEqual(), MapContains(), StlIterNext(), StlSequenceIter(), TCollectionAdd(), TCollectionExtend(), TCollectionIMul(), TCollectionMul(), TCollectionRemove(), THNIMul(), TIterNext(), TObjectCompare(), TObjectContains(), TObjectIsEqual(), TObjectIsNotEqual(), TObjStringLength(), TSeqCollectionIndex(), TSeqCollectionInsert(), TSeqCollectionReverse(), TSeqCollectionSetItem(), TSeqCollectionSort(), and VectorGetItem().
PyObject* @39::CallSelfIndex | ( | ObjectProxy * | self, | |
PyObject * | idx, | |||
const char * | meth | |||
) | [inline, static] |
Definition at line 139 of file Pythonize.cxx.
References CallPyObjMethod(), PyStyleIndex(), and result().
Referenced by TSeqCollectionDelItem(), TSeqCollectionGetItem(), TSeqCollectionPop(), and VectorGetItem().
Definition at line 833 of file Pythonize.cxx.
References CallPyObjMethod(), kFALSE, kTRUE, PyInt_AsSsize_t, and size.
Referenced by PyROOT::Pythonize().
Definition at line 169 of file Pythonize.cxx.
References CallPyObjMethod(), Py_TYPE, PyROOT_PyUnicode_AsString, PyROOT_PyUnicode_Check, and result().
Referenced by PyROOT::Pythonize().
Definition at line 197 of file Pythonize.cxx.
References CallPyObjMethod(), PyROOT_PyUnicode_Check, and result().
Referenced by PyROOT::Pythonize().
Definition at line 251 of file Pythonize.cxx.
References CallPyObjMethod(), PyROOT::ObjectProxy_Type, and result().
Referenced by PyROOT::Pythonize().
Definition at line 267 of file Pythonize.cxx.
References CallPyObjMethod(), PyROOT::ObjectProxy_Type, and result().
Referenced by PyROOT::Pythonize().
Bool_t @39::HasAttrDirect | ( | PyObject * | pyclass, | |
PyObject * | pyname, | |||
Bool_t | mustBePyROOT = kFALSE | |||
) | [static] |
Definition at line 51 of file Pythonize.cxx.
References kFALSE, kTRUE, and PyROOT::MethodProxy_Check().
Referenced by PyROOT::Pythonize().
Bool_t @39::IsTemplatedSTLClass | ( | const std::string & | name, | |
const std::string & | klass | |||
) | [inline, static] |
Definition at line 793 of file Pythonize.cxx.
References CallPyObjMethod(), PyROOT::ObjectProxy_Check(), and result().
Referenced by PyROOT::Pythonize().
Definition at line 855 of file Pythonize.cxx.
References PyROOT::PyStrings::gFirst, PyROOT::PyStrings::gSecond, and PyROOT::ObjectProxy_Check().
Referenced by PyROOT::Pythonize().
Definition at line 116 of file Pythonize.cxx.
References PyInt_AsSsize_t, and size.
Referenced by CallSelfIndex(), TClonesArraySetItem(), and TSeqCollectionSetItem().
PyObject* @39::ReturnThree | ( | ObjectProxy * | , | |
PyObject * | ||||
) | [static] |
PyObject* @39::ReturnTwo | ( | ObjectProxy * | , | |
PyObject * | ||||
) | [static] |
Definition at line 1001 of file Pythonize.cxx.
References RooFit::ClassName().
Referenced by PyROOT::Pythonize().
Definition at line 1011 of file Pythonize.cxx.
References RooFit::ClassName().
Referenced by PyROOT::Pythonize().
Definition at line 969 of file Pythonize.cxx.
References CallPyObjMethod(), dummy, PyROOT::PyStrings::gEnd, and l.
Referenced by PyROOT::Pythonize().
Definition at line 820 of file Pythonize.cxx.
References CallPyObjMethod(), and PyROOT::PyStrings::gEnd.
Referenced by PyROOT::Pythonize().
PyObject* @39::TClassDynamicCast | ( | ObjectProxy * | self, | |
PyObject * | args | |||
) | [static] |
Definition at line 338 of file Pythonize.cxx.
References PyROOT::BindRootObjectNoCast(), xmlio::Class, TClass::DynamicCast(), PyROOT::ObjectProxy::GetObject(), PyROOT::PyStrings::gTClassDynCast, PyROOT::ObjectProxy::ObjectIsA(), PyROOT::ObjectProxy_Type, ptr, and result().
Referenced by PyROOT::Pythonize().
PyObject* @39::TClassStaticCast | ( | ObjectProxy * | self, | |
PyObject * | args | |||
) | [static] |
Definition at line 280 of file Pythonize.cxx.
References PyROOT::BindRootObjectNoCast(), xmlio::Class, TClass::DynamicCast(), PyROOT::Utility::GetBuffer(), PyROOT::ObjectProxy::GetObject(), TClass::InheritsFrom(), kFALSE, PyROOT::ObjectProxy::ObjectIsA(), PyROOT::ObjectProxy_Check(), PyROOT::ObjectProxy_Type, and result().
Referenced by PyROOT::Pythonize().
PyObject* @39::TClonesArraySetItem | ( | ObjectProxy * | self, | |
PyObject * | args | |||
) | [static] |
Definition at line 713 of file Pythonize.cxx.
References xmlio::Class, TClonesArray::GetClass(), PyROOT::ObjectProxy::GetObject(), int, object, PyROOT::ObjectProxy::ObjectIsA(), PyROOT::ObjectProxy_Type, PyStyleIndex(), PyROOT::ObjectProxy::Release(), TClonesArray::RemoveAt(), and TClass::Size().
Referenced by PyROOT::Pythonize().
Definition at line 409 of file Pythonize.cxx.
References CallPyObjMethod(), l, and result().
Referenced by PyROOT::Pythonize().
Definition at line 464 of file Pythonize.cxx.
References i, and PyInt_FromSsize_t.
Referenced by PyROOT::Pythonize().
Definition at line 377 of file Pythonize.cxx.
References CallPyObjMethod(), i, and result().
Referenced by PyROOT::Pythonize().
Definition at line 447 of file Pythonize.cxx.
References CallPyObjMethod(), i, and l.
Referenced by PyROOT::Pythonize().
PyObject* @39::TCollectionIter | ( | ObjectProxy * | self | ) | [static] |
Definition at line 485 of file Pythonize.cxx.
References PyROOT::BindRootObject(), xmlio::Class, TClass::DynamicCast(), PyROOT::ObjectProxy::GetObject(), and PyROOT::ObjectProxy::ObjectIsA().
Referenced by PyROOT::Pythonize().
PyObject* @39::TCollectionMul | ( | ObjectProxy * | self, | |
PyObject * | pymul | |||
) | [static] |
Definition at line 425 of file Pythonize.cxx.
References PyROOT::BindRootObject(), CallPyObjMethod(), PyROOT::ObjectProxy::GetObject(), i, TClass::New(), PyROOT::ObjectProxy::ObjectIsA(), and result().
Referenced by PyROOT::Pythonize().
Definition at line 391 of file Pythonize.cxx.
References CallPyObjMethod(), and result().
Referenced by PyROOT::Pythonize().
PyObject* @39::TDirectoryGetObject | ( | ObjectProxy * | self, | |
PyObject * | args | |||
) | [static] |
Definition at line 1022 of file Pythonize.cxx.
References xmlio::Class, dir(), TClass::DynamicCast(), PyROOT::ObjectProxy::GetObject(), name, PyROOT::ObjectProxy::ObjectIsA(), PyROOT::ObjectProxy_Type, ptr, PyROOT_PyUnicode_AsString, and PyROOT_PyUnicode_Type.
Referenced by PyROOT::Pythonize().
PyObject* @39::TDirectoryWriteObject | ( | ObjectProxy * | self, | |
PyObject * | args | |||
) | [static] |
Definition at line 1051 of file Pythonize.cxx.
References bufsize, xmlio::Class, dir(), TClass::DynamicCast(), PyROOT::ObjectProxy::GetObject(), name, PyROOT::ObjectProxy::ObjectIsA(), PyROOT::ObjectProxy_Type, option, PyROOT_PyUnicode_AsString, PyROOT_PyUnicode_Type, and result().
Referenced by PyROOT::Pythonize().
int @39::TFNPyCallback | ( | G__value * | res, | |
G__CONST char * | , | |||
struct G__param * | libp, | |||
int | hash | |||
) | [static] |
Definition at line 1425 of file Pythonize.cxx.
References d, G__letdouble, G__value_get_tagnum, PyROOT::Utility::GetInstalledMethod(), libp, G__param::para, and result().
PyObject* @39::TFunctionCall | ( | ObjectProxy * | self, | |
PyObject * | args | |||
) | [static] |
Definition at line 1648 of file Pythonize.cxx.
References PyROOT::ObjectProxy::GetObject().
Referenced by PyROOT::Pythonize().
Definition at line 1412 of file Pythonize.cxx.
References CallPyObjMethod(), and result().
Referenced by PyROOT::Pythonize().
Definition at line 951 of file Pythonize.cxx.
References CallPyObjMethod().
Referenced by PyROOT::Pythonize().
int @39::TMinuitPyCallback | ( | G__value * | res, | |
G__CONST char * | , | |||
struct G__param * | libp, | |||
int | hash | |||
) | [static] |
Definition at line 1466 of file Pythonize.cxx.
References G__Doubleref, G__setnull, G__value_get_tagnum, PyROOT::Utility::GetInstalledMethod(), libp, G__param::para, and result().
Definition at line 224 of file Pythonize.cxx.
References CallPyObjMethod(), l, and PyROOT::ObjectProxy_Check().
Referenced by PyROOT::Pythonize().
Definition at line 212 of file Pythonize.cxx.
References CallPyObjMethod(), l, PyROOT::ObjectProxy_Check(), PyROOT_PyUnicode_Check, and result().
Referenced by PyROOT::Pythonize().
Definition at line 233 of file Pythonize.cxx.
References CallPyObjMethod(), PyROOT::ObjectProxy_Check(), and PyROOT::ObjectProxy_Type.
Referenced by PyROOT::Pythonize().
Definition at line 242 of file Pythonize.cxx.
References BoolNot(), CallPyObjMethod(), PyROOT::ObjectProxy_Check(), and PyROOT::ObjectProxy_Type.
Referenced by PyROOT::Pythonize().
Definition at line 934 of file Pythonize.cxx.
References CallPyObjMethod(), data, PyInt_FromSsize_t, and size.
Referenced by PyROOT::Pythonize().
PyObject* @39::TSeqCollectionDelItem | ( | ObjectProxy * | self, | |
PySliceObject * | index | |||
) | [static] |
Definition at line 577 of file Pythonize.cxx.
References CallSelfIndex(), xmlio::Class, TClass::DynamicCast(), PyROOT::ObjectProxy::GetObject(), TCollection::GetSize(), i, PyROOT::ObjectProxy::ObjectIsA(), TSeqCollection::RemoveAt(), result(), and start.
Referenced by PyROOT::Pythonize().
PyObject* @39::TSeqCollectionGetItem | ( | ObjectProxy * | self, | |
PySliceObject * | index | |||
) | [static] |
Definition at line 501 of file Pythonize.cxx.
References TSeqCollection::Add(), TSeqCollection::At(), PyROOT::BindRootObject(), CallSelfIndex(), xmlio::Class, TClass::DynamicCast(), PyROOT::ObjectProxy::GetObject(), TCollection::GetSize(), i, TClass::New(), and start.
Referenced by PyROOT::Pythonize().
Definition at line 697 of file Pythonize.cxx.
References CallPyObjMethod().
Referenced by PyROOT::Pythonize().
Definition at line 608 of file Pythonize.cxx.
References CallPyObjMethod(), and size.
Referenced by PyROOT::Pythonize().
PyObject* @39::TSeqCollectionPop | ( | ObjectProxy * | self, | |
PyObject * | args | |||
) | [static] |
Definition at line 624 of file Pythonize.cxx.
References CallSelfIndex(), PyInt_FromSsize_t, and result().
Referenced by PyROOT::Pythonize().
Definition at line 643 of file Pythonize.cxx.
References CallPyObjMethod(), i, result(), and retval.
Referenced by PyROOT::Pythonize().
PyObject* @39::TSeqCollectionSetItem | ( | ObjectProxy * | self, | |
PyObject * | args | |||
) | [static] |
Definition at line 527 of file Pythonize.cxx.
References TSeqCollection::AddAt(), CallPyObjMethod(), xmlio::Class, TClass::DynamicCast(), PyROOT::ObjectProxy::GetObject(), TCollection::GetSize(), i, PyROOT::ObjectProxy::ObjectIsA(), PyStyleIndex(), TSeqCollection::RemoveAt(), result(), and start.
Referenced by PyROOT::Pythonize().
Definition at line 662 of file Pythonize.cxx.
References CallPyObjMethod(), l, and result().
Referenced by PyROOT::Pythonize().
PyObject* @39::VectorGetItem | ( | ObjectProxy * | self, | |
PySliceObject * | index | |||
) | [static] |
Definition at line 766 of file Pythonize.cxx.
References CallPyObjMethod(), CallSelfIndex(), PyROOT::PyStrings::gClass, PyROOT::ObjectProxy::GetObject(), i, NULL, PyInt_FromSsize_t, and start.
Referenced by PyROOT::Pythonize().
Definition at line 1529 of file Pythonize.cxx.
PyObject* gFitterPyCallback = 0 [static] |
Definition at line 1715 of file Pythonize.cxx.