Get all addresses for this event from provider.
Only call registerKeys() if we haven't seen this form before.
81 {
83 return StatusCode::SUCCESS;
84 }
85
88 if (dataHeader == nullptr) {
90 if (!eventDataHeader.isValid()) {
92 return StatusCode::FAILURE;
93 }
94 dataHeader = eventDataHeader.cptr();
95 }
96
98 const AthenaAttributeList* attrList = nullptr;
99 std::string tokenStr;
101 try {
102 tokenStr = (*attrList)["eventRef_secondary"].data<std::string>();
103 ATH_MSG_DEBUG(
"found AthenaAttribute, name = eventRef_secondary = " << tokenStr);
104 } catch (std::exception &e) {
106 return StatusCode::FAILURE;
107 }
108 } else {
110 return StatusCode::FAILURE;
111 }
113 if (!
eventStore()->recordAddress(iop).isSuccess()) {
114 ATH_MSG_ERROR(
"Cannot record address to StoreGate with token string: " << tokenStr);
115 return StatusCode::FAILURE;
116 }
118 }
120 bool doRegister = dataHeader->
dhFormToken().empty() ||
122 ATH_MSG_DEBUG(
"The current Event contains: " << dataHeader->
size() <<
" objects");
123 for (const auto& element : *dataHeader) {
124 if (doRegister) {
126 }
129 delete tadd; tadd = nullptr;
130 } else {
131 ATH_MSG_DEBUG(
"loadAddresses: DataObject address, clid = " << tadd->
clID() <<
", name = " << tadd->
name());
133 tads.push_back(tadd);
134 }
135 }
137 return StatusCode::SUCCESS;
138}
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_ERROR(x,...)
StoreGateSvc * eventStore() const
Return pointer to active event SG.
std::unordered_set< std::string > m_dhFormKeys
Set of DataHeader form keys for which we've already done registerKeys.
Gaudi::Property< std::string > m_attrListKey
Gaudi::Property< std::string > m_dataHeaderKey
static const Guid & null() noexcept
NULL-Guid: static class method.
CLID clID() const
Retrieve string key:
const std::string & name() const
Get the primary (hashed) SG key.
void setProvider(IAddressProvider *provider, StoreID::type storeID)
void registerKeys(const DataHeaderElement &dhe, StoreGateSvc *store)
Register all hash keys for one DH Element.
static const DbType POOL_StorageType
static constexpr CLID ID()