7#ifndef ATHENAKERNEL_DATABUCKET_H
8#define ATHENAKERNEL_DATABUCKET_H
13#include "GaudiKernel/ClassID.h"
25 class IRegisterTransient;
26 class CopyConversionBase;
51 typedef typename std::remove_const<T>::type T_nc;
52 return const_cast<T_nc*
>(
m_ptr);
58 virtual const std::type_info&
tinfo()
const override
71 operator T*() {
return ptr(); }
72 operator const T*()
const {
return cptr(); }
84 bool isConst =
true)
override;
97 bool isConst =
true)
override;
112 const std::type_info&
tinfo,
114 bool isConst =
true)
override;
158 typedef std::pair<const CopyConversionBase*, void*>
ent_t;
uint32_t CLID
The Class ID type.
char data[hepevt_bytes_allocation_ATLAS]
static const CLID & classID()
DataBucket(std::unique_ptr< U > data)
virtual void * cast(const std::type_info &tinfo, IRegisterTransient *irt=0, bool isConst=true) override
Return the contents of the DataBucket, converted to type given by std::type_info.
virtual const std::type_info & tinfo() const override
Return the type_info for the stored object.
virtual void * cast(CLID clid, const std::type_info &tinfo, SG::IRegisterTransient *irt=0, bool isConst=true) override
Return the contents of the DataBucket, converted to type given by clid.
virtual void lock() override
If the held object derives from ILockable, call lock() on it.
virtual void * object() override
void * tryStaticConversion(CLID clid)
Try a conversion using static SG_BASES information.
virtual const CLID & clID() const override
void * tryStaticConversion(const std::type_info &tinfo)
Try a conversion using static SG_BASES information.
DataBucket & operator=(const DataBucket &)
std::vector< ent_t > vec_t
virtual void * cast(CLID clid, IRegisterTransient *irt=0, bool isConst=true) override
Return the contents of the DataBucket, converted to type given by clid.
virtual void relinquish() override
Give up ownership of the DataBucket contents.
DataBucket(const DataBucket &)
std::pair< const CopyConversionBase *, void * > ent_t
Objects made by copy conversion.
Interface for registering a transient object in t2p map.