11#include "GaudiKernel/TypeNameString.h"
12#include "GaudiKernel/IClassIDSvc.h"
14#include "eformat/SourceIdentifier.h"
18 : base_class(name, pSvcLocator),
m_clidSvc(
"ClassIDSvc", name) {}
28 return StatusCode::FAILURE;
31 return StatusCode::SUCCESS;
38 return StatusCode::SUCCESS;
42 Gaudi::Utils::TypeNameString item(typeName);
43 const std::string& t = item.type();
44 const std::string& nm = item.name();
46 if (!
m_clidSvc->getIDOfTypeName(t, classid).isSuccess()) {
47 ATH_MSG_WARNING(
"Cannot create TAD for (type, name)" <<
" no CLID for " << t <<
" " << nm);
51 ATH_MSG_DEBUG(
"Created TAD for (type, clid, name)" << t <<
" " << classid <<
" " << nm);
56 return StatusCode::SUCCESS;
61 const EventContext& ctx) {
63 return StatusCode::FAILURE;
66 std::string nm = tad->
name();
68 if (it ==
m_clidKey.end() || it->second.count(nm) == 0) {
69 return StatusCode::FAILURE;
73 add->setEventContext(ctx);
75 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
uint32_t CLID
The Class ID type.
virtual StatusCode preLoadAddresses(StoreID::type id, tadList &tlist) override
Gaudi::Property< std::vector< std::string > > m_typeNames
virtual StatusCode updateAddress(StoreID::type id, SG::TransientAddress *tad, const EventContext &ctx) override
update an existing transient Address
virtual StatusCode initialize() override
ByteStreamAddressProviderSvc(const std::string &name, ISvcLocator *pSvcLocator)
Standard constructor.
ServiceHandle< IClassIDSvc > m_clidSvc
std::map< unsigned int, std::set< std::string > > m_clidKey
Gaudi::Property< int > m_storeID
IOpaqueAddress for ByteStreamCnvSvc, with ROB ids.
CLID clID() const
Retrieve string key:
const std::string & name() const
Get the primary (hashed) SG key.
void setAddress(CxxUtils::RefCountedPtr< IOpaqueAddress > pAddress)
Retrieve primary clid.
bool add(const std::string &hname, TKey *tobj)