![]() |
The Gaudi Framework
master (ff829712)
|
DataObjectHandle.h GaudiKernel/DataObjectHandle.h. More...
#include </builds/gaudi/Gaudi/GaudiKernel/include/GaudiKernel/DataObjectHandle.h>
Public Member Functions | |
T * | get () const |
Retrieve object from transient data store. | |
T * | getIfExists () const |
Bypass check of existence of object in transient store Only uses main location of the. | |
bool | exist () const |
Check the existence of the object in the transient store. | |
T * | getOrCreate () const |
Get object from store or create a new one if it doesn't exist. | |
T * | put (std::unique_ptr< T > object) const |
Register object in transient store. | |
std::string | pythonRepr () const override |
DataObjectHandleBase (DataObjID k, Gaudi::DataHandle::Mode a, IDataHandleHolder *owner) | |
DataObjectHandleBase (std::string k, Gaudi::DataHandle::Mode a, IDataHandleHolder *owner) | |
DataObjectHandleBase (const DataObjectHandleBase &)=delete | |
DataObjectHandleBase (DataObjectHandleBase &&) | |
template<std::derived_from< IProperty > OWNER, class K> | |
DataObjectHandleBase (OWNER *owner, Gaudi::DataHandle::Mode m, std::string name, K key={}, std::string doc="") | |
Autodeclaring constructor with property name, mode, key and documentation. | |
![]() | |
DataObjectHandleBase (DataObjID k, Gaudi::DataHandle::Mode a, IDataHandleHolder *owner) | |
DataObjectHandleBase (std::string k, Gaudi::DataHandle::Mode a, IDataHandleHolder *owner) | |
~DataObjectHandleBase () override | |
DataObjectHandleBase (const DataObjectHandleBase &)=delete | |
DataObjectHandleBase (DataObjectHandleBase &&) | |
DataObjectHandleBase & | operator= (const DataObjectHandleBase &) |
template<std::derived_from< IProperty > OWNER, class K> | |
DataObjectHandleBase (OWNER *owner, Gaudi::DataHandle::Mode m, std::string name, K key={}, std::string doc="") | |
Autodeclaring constructor with property name, mode, key and documentation. | |
bool | isOptional () const |
Check if the data object declared is optional for the algorithm. | |
void | setOptional (bool optional=true) |
bool | isValid () const |
![]() | |
DataHandle (DataObjID k, Mode a=Reader, IDataHandleHolder *owner=nullptr) | |
DataHandle (DataObjID k, bool isCond, Mode a=Reader, IDataHandleHolder *owner=nullptr) | |
virtual | ~DataHandle ()=default |
virtual void | setOwner (IDataHandleHolder *o) |
virtual IDataHandleHolder * | owner () const |
virtual Mode | mode () const |
virtual void | setKey (DataObjID key) |
virtual void | updateKey (std::string key) |
virtual const std::string & | objKey () const |
virtual const DataObjID & | fullKey () const |
virtual void | reset (bool) |
virtual bool | isCondition () const |
Private Member Functions | |
T * | get (bool mustExist) const |
Try to retrieve from the transient store. | |
Private Attributes | |
bool | m_goodType = false |
Additional Inherited Members | |
![]() | |
enum | Mode { Reader = 1 << 2 , Writer = 1 << 4 } |
using | PropertyType = DataHandleProperty |
![]() | |
bool | init () override |
DataObject * | fetch () const |
![]() | |
SmartIF< IDataProviderSvc > | m_EDS |
SmartIF< IMessageSvc > | m_MS |
bool | m_init = false |
bool | m_optional = false |
![]() | |
DataObjID | m_key = { "NONE" } |
The key of the object behind this DataHandle Although it may look strange to have it mutable, this can actually change in case the object had alternative names, and it should not be visible to the end user, for which the Handle is still the same. | |
IDataHandleHolder * | m_owner = nullptr |
![]() | |
static const std::string | default_type = "unknown_t" |
DataObjectHandle.h GaudiKernel/DataObjectHandle.h.
Templated Handle class for objects in the event store
Inheritance: DataHandle->DataObjectHandleBase->DataObjectHandle<T>
Definition at line 110 of file DataObjectHandle.h.
|
delete |
DataObjectHandleBase::DataObjectHandleBase | ( | DataObjectHandleBase && | other | ) |
Definition at line 42 of file DataObjectHandleBase.cpp.
DataObjectHandleBase::DataObjectHandleBase | ( | DataObjID | k, |
Gaudi::DataHandle::Mode | a, | ||
IDataHandleHolder * | owner ) |
Definition at line 37 of file DataObjectHandleBase.cpp.
|
inline |
Autodeclaring constructor with property name, mode, key and documentation.
Definition at line 48 of file DataObjectHandleBase.h.
DataObjectHandleBase::DataObjectHandleBase | ( | std::string | k, |
Gaudi::DataHandle::Mode | a, | ||
IDataHandleHolder * | owner ) |
Definition at line 38 of file DataObjectHandleBase.cpp.
|
inline |
Check the existence of the object in the transient store.
Definition at line 128 of file DataObjectHandle.h.
|
inline |
|
private |
Try to retrieve from the transient store.
If the retrieval succeded and this is the first time we retrieve, perform a dynamic cast to the desired object. Then finally set the handle as Read. If this is not the first time we cast and the cast worked, just use the static cast: we do not need the checks of the dynamic cast for every access!
Definition at line 160 of file DataObjectHandle.h.
|
inline |
Bypass check of existence of object in transient store Only uses main location of the.
Definition at line 123 of file DataObjectHandle.h.
T * DataObjectHandle< T >::getOrCreate | ( | ) | const |
Get object from store or create a new one if it doesn't exist.
Definition at line 184 of file DataObjectHandle.h.
T * DataObjectHandle< T >::put | ( | std::unique_ptr< T > | object | ) | const |
Register object in transient store.
Definition at line 175 of file DataObjectHandle.h.
|
inlineoverridevirtual |
Reimplemented from Gaudi::DataHandle.
Definition at line 140 of file DataObjectHandle.h.
|
mutableprivate |
Definition at line 147 of file DataObjectHandle.h.