#include <GaudiPython/Helpers.h>
|
static IService * | service (ISvcLocator *svcloc, const std::string &name, bool createif=false) |
|
static IAlgorithm * | algorithm (IAlgManager *algmgr, const std::string &name, const bool createIf=false) |
|
static DataObject * | dataobject (IDataProviderSvc *dpsvc, const std::string &path) |
|
static StatusCode | registerObject (IDataProviderSvc *dpsvc, const std::string &path, DataObject *pObject) |
|
static StatusCode | unregisterObject (IDataProviderSvc *dpsvc, const std::string &path) |
|
static GAUDI_API DataObject * | findobject (IDataProviderSvc *dpsvc, const std::string &path) |
| simple wrapper for IDataProviderSvc::findObject The methdod does NOT trigger the loading the object from tape or Data-On-Demand action More...
|
|
static GAUDI_API DataObject * | getobject (IDataProviderSvc *dpsvc, const std::string &path, const bool retrieve=true, const bool disableDoD=false) |
| the generic function to get object from TES More...
|
|
static IAlgTool * | tool (IToolSvc *toolsvc, const std::string &type, const std::string &name, IInterface *p, bool cif) |
|
static long | loadDynamicLib (const std::string &name) |
|
static IHistogram1D * | histo1D (IHistogramSvc *hsvc, const std::string &path) |
|
static IHistogram2D * | histo2D (IHistogramSvc *hsvc, const std::string &path) |
|
static IHistogram3D * | histo3D (IHistogramSvc *hsvc, const std::string &path) |
|
static IProfile1D * | profile1D (IHistogramSvc *hsvc, const std::string &path) |
|
static IProfile2D * | profile2D (IHistogramSvc *hsvc, const std::string &path) |
|
template<class T > |
static PyObject * | toArray (T *ptr, Py_ssize_t size) |
|
static PyObject * | toIntArray (void *ptr, Py_ssize_t size) |
|
static PyObject * | toShortArray (void *ptr, Py_ssize_t size) |
|
static PyObject * | toFloatArray (void *ptr, Py_ssize_t size) |
|
static PyObject * | toDoubleArray (void *ptr, Py_ssize_t size) |
|
template<class T > |
static T * | toAddress (std::vector< T > &v) |
|
template<class T > |
static T * | toAddress (void *a) |
|
static StatusCode | setPropertyFromString (Gaudi::Details::PropertyBase &p, const std::string &s) |
|
Definition at line 52 of file Helpers.h.
GaudiPython::Helper::Helper |
( |
| ) |
|
|
inline |
Definition at line 63 of file Helpers.h.
virtual SmartIF< IAlgorithm > & algorithm(const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true)=0
Returns a smart pointer to a service.
TYPE * get() const
Get interface pointer.
template<class T >
static PyObject* GaudiPython::Helper::Array_item |
( |
PyObject * |
self, |
|
|
Py_ssize_t |
idx |
|
) |
| |
|
inlinestaticprivate |
Definition at line 173 of file Helpers.h.
175 #if PY_VERSION_HEX < 0x02050000 179 Py_ssize_t size = ( *(
self->ob_type->tp_as_buffer->bf_getcharbuffer ) )(
self, 0, &buf );
180 if ( idx < 0 || idx >= size /
int(
sizeof( T ) ) ) {
181 PyErr_SetString( PyExc_IndexError,
"buffer index out of range" );
int Py_ssize_t
For compatibility with Python 2.4 and 2.5.
static PyObject * toPython(T *)
constexpr auto size(const C &c) noexcept(noexcept(c.size())) -> decltype(c.size())
template<class T >
static Py_ssize_t GaudiPython::Helper::Array_length |
( |
PyObject * |
self | ) |
|
|
inlinestaticprivate |
Definition at line 150 of file Helpers.h.
152 #if PY_VERSION_HEX < 0x02050000 156 Py_ssize_t size = ( *(
self->ob_type->tp_as_buffer->bf_getcharbuffer ) )(
self, 0, &buf );
157 return size /
sizeof( T );
int Py_ssize_t
For compatibility with Python 2.4 and 2.5.
constexpr auto size(const C &c) noexcept(noexcept(c.size())) -> decltype(c.size())
Definition at line 68 of file Helpers.h.
virtual StatusCode retrieveObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
A DataObject is the base class of any identifiable object on any data store.
simple wrapper for IDataProviderSvc::findObject The methdod does NOT trigger the loading the object from tape or Data-On-Demand action
- See also
- IDataProviderSvc
-
IDataProviderSvc::findObject
- Parameters
-
psvc | (INPUT) pointer to Data ProviderService |
path | the full path in TES |
- Returns
- the object
- Author
- Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
- Date
- 2009-10-09
Definition at line 41 of file Helpers.cpp.
virtual StatusCode findObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Find object identified by its directory entry.
This class is used for returning status codes from appropriate routines.
A DataObject is the base class of any identifiable object on any data store.
the generic function to get object from TES
- See also
- IDataProviderSvc
-
IDataProviderSvc::findObject
-
IDataProviderSvc::retriveObject
- Parameters
-
psvc | (INPUT) pointer to Data ProviderService |
path | the full path in TES |
rerieve | (INPUT) retrieve or find object ? |
disableDoD | (INPUT) disable 'on-demand-actions' ? |
- Author
- Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
- Date
- 2009-10-09
Definition at line 116 of file Helpers.cpp.
123 Disabler sentry( dpsvc, disable );
129 return sc.
isSuccess() ? result :
nullptr;
virtual StatusCode findObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Find object identified by its directory entry.
This class is used for returning status codes from appropriate routines.
virtual StatusCode retrieveObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
A DataObject is the base class of any identifiable object on any data store.
Definition at line 121 of file Helpers.h.
virtual StatusCode findObject(const std::string &fullPath, AIDA::IHistogram1D *&h1dObj)=0
Definition at line 126 of file Helpers.h.
virtual StatusCode findObject(const std::string &fullPath, AIDA::IHistogram1D *&h1dObj)=0
Definition at line 131 of file Helpers.h.
virtual StatusCode findObject(const std::string &fullPath, AIDA::IHistogram1D *&h1dObj)=0
static long GaudiPython::Helper::loadDynamicLib |
( |
const std::string & |
name | ) |
|
|
inlinestatic |
Definition at line 116 of file Helpers.h.
GAUDI_API unsigned long loadDynamicLib(const std::string &name, ImageHandle *handle)
Load dynamic link library.
Definition at line 136 of file Helpers.h.
virtual StatusCode findObject(const std::string &fullPath, AIDA::IHistogram1D *&h1dObj)=0
Definition at line 141 of file Helpers.h.
virtual StatusCode findObject(const std::string &fullPath, AIDA::IHistogram1D *&h1dObj)=0
Definition at line 74 of file Helpers.h.
virtual StatusCode registerObject(boost::string_ref fullPath, DataObject *pObject)=0
Register object with the data store.
Definition at line 58 of file Helpers.h.
60 return svcloc->
service( name, createif ).get();
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition at line 223 of file Helpers.h.
virtual StatusCode fromString(const std::string &value)=0
string -> value
template<class T >
static T* GaudiPython::Helper::toAddress |
( |
std::vector< T > & |
v | ) |
|
|
inlinestatic |
template<class T >
static T* GaudiPython::Helper::toAddress |
( |
void * |
a | ) |
|
|
inlinestatic |
template<class T >
template PyObject * GaudiPython::Helper::toArray |
( |
T * |
ptr, |
|
|
Py_ssize_t |
size |
|
) |
| |
|
inlinestatic |
Definition at line 189 of file Helpers.h.
191 static PyTypeObject
type = PyBuffer_Type;
192 static PySequenceMethods meth = *( PyBuffer_Type.tp_as_sequence );
193 #if PY_VERSION_HEX < 0x02050000 194 meth.sq_item = (intargfunc)&Array_item<T>;
195 meth.sq_length = (inquiry)&Array_length<T>;
197 meth.sq_item = (ssizeargfunc)&Array_item<T>;
198 meth.sq_length = (lenfunc)&Array_length<T>;
200 type.tp_as_sequence = &meth;
201 PyObject* buf = PyBuffer_FromReadWriteMemory( ptr,
size *
sizeof( T ) );
202 buf->ob_type = &
type;
203 Py_INCREF( buf->ob_type );
constexpr auto size(const C &c) noexcept(noexcept(c.size())) -> decltype(c.size())
static PyObject* GaudiPython::Helper::toDoubleArray |
( |
void * |
ptr, |
|
|
Py_ssize_t |
size |
|
) |
| |
|
inlinestatic |
Definition at line 209 of file Helpers.h.
static PyObject * toArray(T *ptr, Py_ssize_t size)
constexpr auto size(const C &c) noexcept(noexcept(c.size())) -> decltype(c.size())
static PyObject* GaudiPython::Helper::toFloatArray |
( |
void * |
ptr, |
|
|
Py_ssize_t |
size |
|
) |
| |
|
inlinestatic |
Definition at line 208 of file Helpers.h.
static PyObject * toArray(T *ptr, Py_ssize_t size)
constexpr auto size(const C &c) noexcept(noexcept(c.size())) -> decltype(c.size())
static PyObject* GaudiPython::Helper::toIntArray |
( |
void * |
ptr, |
|
|
Py_ssize_t |
size |
|
) |
| |
|
inlinestatic |
Definition at line 206 of file Helpers.h.
static PyObject * toArray(T *ptr, Py_ssize_t size)
constexpr auto size(const C &c) noexcept(noexcept(c.size())) -> decltype(c.size())
Definition at line 110 of file Helpers.h.
static const InterfaceID & interfaceID()
Return an instance of InterfaceID identifying the interface.
template<class T >
static PyObject* GaudiPython::Helper::toPython |
( |
T * |
| ) |
|
|
inlinestaticprivate |
static PyObject* GaudiPython::Helper::toPython |
( |
int * |
o | ) |
|
|
inlinestaticprivate |
Definition at line 165 of file Helpers.h.
165 {
return PyInt_FromLong( (
long)*o ); }
static PyObject* GaudiPython::Helper::toPython |
( |
short * |
o | ) |
|
|
inlinestaticprivate |
Definition at line 166 of file Helpers.h.
166 {
return PyInt_FromLong( (
long)*o ); }
static PyObject* GaudiPython::Helper::toPython |
( |
char * |
o | ) |
|
|
inlinestaticprivate |
Definition at line 167 of file Helpers.h.
167 {
return PyInt_FromLong( (
long)*o ); }
static PyObject* GaudiPython::Helper::toPython |
( |
long * |
o | ) |
|
|
inlinestaticprivate |
Definition at line 168 of file Helpers.h.
168 {
return PyInt_FromLong( *o ); }
static PyObject* GaudiPython::Helper::toPython |
( |
float * |
o | ) |
|
|
inlinestaticprivate |
Definition at line 169 of file Helpers.h.
169 {
return PyFloat_FromDouble( (
double)*o ); }
static PyObject* GaudiPython::Helper::toPython |
( |
double * |
o | ) |
|
|
inlinestaticprivate |
Definition at line 170 of file Helpers.h.
170 {
return PyFloat_FromDouble( *o ); }
static PyObject* GaudiPython::Helper::toShortArray |
( |
void * |
ptr, |
|
|
Py_ssize_t |
size |
|
) |
| |
|
inlinestatic |
Definition at line 207 of file Helpers.h.
static PyObject * toArray(T *ptr, Py_ssize_t size)
constexpr auto size(const C &c) noexcept(noexcept(c.size())) -> decltype(c.size())
Definition at line 79 of file Helpers.h.
virtual StatusCode unregisterObject(boost::string_ref fullPath)=0
Unregister object from the data store.
The documentation for this struct was generated from the following files: