 |
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef ATHENASERVICES_ALTDATABUCKET_H
6 #define ATHENASERVICES_ALTDATABUCKET_H
16 #include "GaudiKernel/ClassID.h"
46 AltDataBucket (
void*
ptr,
CLID clid,
const std::type_info& tinfo,
48 : m_proxy(this, makeTransientAddress(clid,
proxy).
release()),
49 m_ptr (
ptr), m_clid (clid), m_tinfo (tinfo)
54 AltDataBucket(
void*
ptr,
CLID clid,
const std::type_info& tinfo,
const std::string&
name) :
55 m_proxy(this,
new SG::TransientAddress(clid,
name) ),
56 m_ptr(
ptr), m_clid(clid), m_tinfo(tinfo)
61 virtual const CLID& clID()
const override {
return m_clid; }
62 virtual void*
object()
override {
return m_ptr; }
63 virtual const std::type_info&
tinfo()
const override {
return m_tinfo; }
69 virtual void*
cast (
const std::type_info& tinfo,
72 {
if (tinfo == m_tinfo)
77 virtual void lock()
override {}
82 std::unique_ptr<SG::TransientAddress>
88 const std::type_info& m_tinfo;
92 std::unique_ptr<SG::TransientAddress>
95 auto newTad = std::make_unique<SG::TransientAddress>
96 (clid, oldProxy.
name());
97 newTad->setAlias (oldProxy.
alias());
105 newTad->setTransientID (tclid);
Interface for registering a transient object in t2p map.
virtual void lock()=0
If the held object derives from ILockable, call lock() on it.
A non-templated base class for DataBucket, allows to access the transient object address as a void*.
virtual void * object()=0
T * cast(SG::IRegisterTransient *irt=0, bool isConst=true)
Return the contents of the DataBucket, converted to type T.
AliasCont_t alias() const
access set of proxy aliases Returns a COPY of the alias set.
uint32_t CLID
The Class ID type.
virtual const name_type & name() const override final
Retrieve data object key == string.
bool transientID(CLID id) const
return the list of transient IDs (primary or symLinked):
virtual void relinquish()=0
Give up ownership of the DataBucket contents.
Interface for registering a transient object in t2p map.
virtual const std::type_info & tinfo() const =0
Return the type_info for the stored object.