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,
47 const SG::DataProxy& proxy)
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; }
65 virtual void* cast (
CLID ,
66 SG::IRegisterTransient* =
nullptr,
69 virtual void* cast (
const std::type_info& tinfo,
70 SG::IRegisterTransient* =
nullptr,
72 {
if (tinfo == m_tinfo)
76 virtual void relinquish()
override {}
77 virtual void lock()
override {}
82 std::unique_ptr<SG::TransientAddress>
83 makeTransientAddress (
CLID clid,
const SG::DataProxy& oldProxy);
85 SG::DataProxy m_proxy;
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);
uint32_t CLID
The Class ID type.
Interface for registering a transient object in t2p map.
A non-templated base class for DataBucket, allows to access the transient object address as a void*.
T * cast(SG::IRegisterTransient *irt=0, bool isConst=true)
Return the contents of the DataBucket, converted to type T.
virtual const name_type & name() const override final
Retrieve data object key == string.
AliasCont_t alias() const
access set of proxy aliases Returns a COPY of the alias set.
bool transientID(CLID id) const
return the list of transient IDs (primary or symLinked):
static std::string release