ATLAS Offline Software
|
Concrete DataBucket
that holds the object via a void*
and uses the Root dictionary to do conversions.
More...
#include <SgPyDataModel.h>
Public Member Functions | |
PyDataBucket (PyObject *obj, CLID clid) | |
Constructor. More... | |
virtual | ~PyDataBucket () override |
Destructor. More... | |
virtual void * | object () override |
Return the held object. More... | |
virtual void * | cast (CLID clid, IRegisterTransient *itr=0, bool isConst=true) override |
Return the contents of the DataBucket , converted to type given by clid. More... | |
virtual void * | cast (const std::type_info &tinfo, IRegisterTransient *itr=0, bool isConst=true) override |
Return the contents of the DataBucket , converted to type given by std::type_info . More... | |
virtual const CLID & | clID () const override |
Retrieve reference to class definition structure. More... | |
virtual const std::type_info & | tinfo () const override |
Return the type_info for the stored object. More... | |
virtual void | relinquish () override |
Give up ownership of the DataBucket contents. More... | |
virtual void | lock () override |
If the held object derives from ILockable , call lock() on it. More... | |
template<class T > | |
T * | cast (SG::IRegisterTransient *irt=0, bool isConst=true) |
Return the contents of the DataBucket , converted to type T. More... | |
virtual void * | cast (CLID clid, SG::IRegisterTransient *irt=0, bool isConst=true)=0 |
Return the contents of the DataBucket , converted to type given by clid. More... | |
virtual void * | cast (const std::type_info &tinfo, SG::IRegisterTransient *irt=0, bool isConst=true)=0 |
Return the contents of the DataBucket , converted to type given by std::type_info. More... | |
virtual void * | cast (CLID clid, const std::type_info &tinfo, SG::IRegisterTransient *irt=0, bool isConst=true) |
Return the contents of the DataBucket , converted to type given by clid. More... | |
template<class T > | |
T * | cast (SG::IRegisterTransient *irt=0, bool isConst=true) |
Return the contents of the DataBucket , converted to type T. More... | |
virtual void * | cast (CLID clid, const std::type_info &tinfo, SG::IRegisterTransient *irt=0, bool isConst=true) |
Return the contents of the DataBucket , converted to type given by clid. More... | |
Private Attributes | |
PyObject * | m_pyObj |
Pointer to the held pyroot object (or 'regular' PyObject) More... | |
CLID | m_clid |
The class ID of the wrapped object. More... | |
const SG::BaseInfoBase * | m_bib |
pointer to the SG::BaseInfoBase structure holding the converter functions for objects held by StoreGate More... | |
Concrete DataBucket
that holds the object via a void*
and uses the Root dictionary to do conversions.
A concrete DataBucket
instance holds a pointer to an arbitrary object, and is able to further convert it to pointers to other types related by inheritance. This variant is used for PyAthena, where don't have the type available at compile time and thus cannot use templates. However, we know that we do have the Root dictionary available for the types, so we can use that information for the conversions.
Definition at line 92 of file SgPyDataModel.h.
Constructor.
pyObj | The (pyroot) object proxy to hold. |
clid | The class ID of the wrapped object. |
Definition at line 43 of file SgPyDataModel.cxx.
|
inlineoverridevirtual |
Destructor.
Definition at line 107 of file SgPyDataModel.h.
|
virtualinherited |
Return the contents of the DataBucket
, converted to type given by clid.
Note that only derived->base conversions are allowed here.
clid | The class ID to which to convert. |
tinfo | The std::type_info of the type to which to convert. |
irt | To be called if we make a new instance. |
isConst | True if the object being converted is regarded as const. |
This allows the callee to choose whether to use clid or tinfo. By default, this uses type_info.
Reimplemented in xAODPrivate::THolderBucket, SG::DVLDataBucket< T >, SG::DVLDataBucket< DV >, SG::DataBucket< T >, SG::DataBucket< DV >, and SG::MetaContDataBucket< T >.
virtual void* DataBucketBase::cast |
Return the contents of the DataBucket
, converted to type given by clid.
Note that only derived->base conversions are allowed here.
clid | The class ID to which to convert. |
tinfo | The std::type_info of the type to which to convert. |
irt | To be called if we make a new instance. |
isConst | True if the object being converted is regarded as const. |
This allows the callee to choose whether to use clid or tinfo. By default, this uses type_info.
|
overridevirtual |
Return the contents of the DataBucket
, converted to type given by clid.
Note that only derived->base conversions are allowed here.
clid | The class ID to which to convert. |
irt | To be called if we make a new instance. |
isConst | True if the object being converted is regarded as const. |
Implements DataBucketBase.
Definition at line 54 of file SgPyDataModel.cxx.
virtual void* DataBucketBase::cast |
Return the contents of the DataBucket
, converted to type given by clid.
Note that only derived->base conversions are allowed here.
clid | The class ID to which to convert. |
irt | To be called if we make a new instance. |
isConst | True if the object being converted is regarded as const. |
|
overridevirtual |
Return the contents of the DataBucket
, converted to type given by std::type_info
.
Note that only derived->base conversions are allowed here.
tinfo | The std::type_info of the type to which to convert. |
irt | To be called if we make a new instance. |
isConst | True if the object being converted is regarded as const. |
Implements DataBucketBase.
Definition at line 103 of file SgPyDataModel.cxx.
virtual void* DataBucketBase::cast |
Return the contents of the DataBucket
, converted to type given by std::type_info.
Note that only derived->base conversions are allowed here.
tinfo | The std::type_info of the type to which to convert. |
irt | To be called if we make a new instance. |
isConst | True if the object being converted is regarded as const. |
|
inherited |
Return the contents of the DataBucket
, converted to type T.
Note that only derived->base conversions are allowed here. T must have a valid Class ID for this to work.
irt | To be called if we make a new instance. |
isConst | True if the object being converted is regarded as const. |
T* DataBucketBase::cast | ( | class T | ) |
Return the contents of the DataBucket
, converted to type T.
Note that only derived->base conversions are allowed here. T must have a valid Class ID for this to work.
irt | To be called if we make a new instance. |
isConst | True if the object being converted is regarded as const. |
|
overridevirtual |
If the held object derives from ILockable
, call lock()
on it.
Implements DataBucketBase.
Definition at line 147 of file SgPyDataModel.cxx.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Give up ownership of the DataBucket
contents.
Implements DataBucketBase.
Definition at line 166 of file SgPyDataModel.h.
|
inlineoverridevirtual |
Return the type_info
for the stored object.
Implements DataBucketBase.
Definition at line 158 of file SgPyDataModel.h.
|
private |
pointer to the SG::BaseInfoBase
structure holding the converter functions for objects held by StoreGate
Definition at line 185 of file SgPyDataModel.h.
|
private |
The class ID of the wrapped object.
Definition at line 181 of file SgPyDataModel.h.
|
private |
Pointer to the held pyroot object (or 'regular' PyObject)
Definition at line 178 of file SgPyDataModel.h.