1 #ifndef GAUDIKERNEL_DATAHANDLE 2 #define GAUDIKERNEL_DATAHANDLE 1 61 virtual bool init() {
return true; }
160 template <typename Owner, std::enable_if_t<std::is_base_of<IDataHandleHolder, Owner>::value>* =
nullptr>
163 if ( m_ownerSetupDone ) {
166 m_property.setOwner( &owner );
167 m_ownerSetupDone =
true;
173 template <
typename Owner,
typename T =
DataObjID,
174 std::enable_if_t<std::is_base_of<IDataHandleHolder, Owner>::value>* =
nullptr>
177 : m_property{&
owner, propertyName, {metadata, std::forward<T>( defaultID )}, docString}
178 , m_ownerSetupDone{
true}
191 template <
typename T = DataObjID>
194 : m_property{propertyName, {metadata, std::forward<T>( defaultID )}, docString}, m_ownerSetupDone{
false}
DataObjID m_key
The key of the object behind this DataHandle Although it may look strange to have it mutable...
DataHandle(const DataObjID &k, const bool &isCond, Mode a=Reader, IDataHandleHolder *owner=nullptr)
Implementation of property with value of concrete type.
const DataObjID & targetKey() const
(Configurable) ID of the data being accessed via this handle
virtual IDataHandleHolder * owner() const
void updateKey(const std::string &key)
IDataHandleHolder * m_owner
PropertyMgr & operator=(const PropertyMgr &)=delete
void setOwner(Owner &owner)
Setup the owner of this DataHandle.
Entity which holds DataHandles and can track the associated data dependencies for the Scheduler...
virtual void setOwner(IDataHandleHolder *o)
DataHandle(const DataObjID &k, Mode a=Reader, IDataHandleHolder *owner=nullptr)
DataHandle(const std::string &propertyName, T &&defaultID, const std::string &docString, const IDataHandleMetadata &metadata)
The above constructor is easier to use correctly, and therefore preferred.
bool ownerSetupDone() const
Truth that owner setup has been performed.
virtual const DataObjID & fullKey() const
const std::string & key() const
virtual Mode mode() const
Base class to all new-style data handles.
virtual bool isCondition() const
virtual void setKey(const DataObjID &key) const
void setTargetKey(const DataObjID &id)
Change the ID of the target data.
bool m_ownerSetupDone
Truth that owner setup has been performed.
Gaudi::Property< DataHandleConfigurable > m_property
Configurable property associated with a DataHandle.
virtual ~DataHandle()=default
virtual std::string pythonRepr() const
DataHandle(Owner &owner, const std::string &propertyName, T &&defaultID, const std::string &docString, const IDataHandleMetadata &metadata)
Handles are constructed like a Gaudi property (and effectively behave as one, which sets the associat...
virtual void updateKey(const std::string &key) const
AccessMode access() const
virtual const std::string & objKey() const
Helper functions to set/get the application return code.