 |
ATLAS Offline Software
|
Go to the documentation of this file.
19 #include "GaudiKernel/IClassIDSvc.h"
20 #include "GaudiKernel/GenericAddress.h"
21 #include "GaudiKernel/StatusCode.h"
32 base_class(
name, pSvcLocator),
33 m_metaDataStore(
"StoreGateSvc/MetaDataStore",
name),
34 m_clidSvc(
"ClassIDSvc",
name),
50 return StatusCode::SUCCESS;
56 return StatusCode::SUCCESS;
63 ATH_MSG_DEBUG(
"Cannot retrieve DataHeader from DetectorStore.");
64 return StatusCode::SUCCESS;
67 for (
const auto& element : *dataHeader) {
70 delete tadd; tadd =
nullptr;
72 ATH_MSG_DEBUG(
"preLoadAddresses: DataObject address, clid = " << tadd->
clID() <<
", name = " << tadd->
name());
78 return StatusCode::SUCCESS;
84 return StatusCode::SUCCESS;
89 if (dataHeader ==
nullptr) {
91 if (!eventDataHeader.
isValid()) {
93 return StatusCode::FAILURE;
95 dataHeader = eventDataHeader.
cptr();
100 std::string tokenStr;
103 tokenStr = (*attrList)[
"eventRef_secondary"].data<std::string>();
104 ATH_MSG_DEBUG(
"found AthenaAttribute, name = eventRef_secondary = " << tokenStr);
107 return StatusCode::FAILURE;
111 return StatusCode::FAILURE;
114 if (!
eventStore()->recordAddress(iop).isSuccess()) {
115 ATH_MSG_ERROR(
"Cannot record address to StoreGate with token string: " << tokenStr);
116 return StatusCode::FAILURE;
121 bool doRegister = dataHeader->
dhFormToken().empty() ||
123 ATH_MSG_DEBUG(
"The current Event contains: " << dataHeader->
size() <<
" objects");
124 for (
const auto& element : *dataHeader) {
130 delete tadd; tadd =
nullptr;
132 ATH_MSG_DEBUG(
"loadAddresses: DataObject address, clid = " << tadd->
clID() <<
", name = " << tadd->
name());
134 tads.push_back(tadd);
138 return StatusCode::SUCCESS;
143 const EventContext& ) {
144 return StatusCode::FAILURE;
def retrieve(aClass, aKey=None)
virtual StatusCode loadAddresses(StoreID::type storeID, IAddressProvider::tadList &tads) override
Get all addresses for this event from provider.
Helper functions for registering hash keys with the SG service.
const_pointer_type cptr()
Dereference the pointer.
ServiceHandle< IClassIDSvc > m_clidSvc
ServiceHandle< StoreGateSvc > m_metaDataStore
virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress *tad, const EventContext &ctx) override
Update a transient address.
const std::string & name() const
Get the primary (hashed) SG key.
Gaudi::Property< std::string > m_dataHeaderKey
void registerKeys(const DataHeaderElement &dhe, StoreGateSvc *store)
Register all hash keys for one DH Element.
Handle class for recording to StoreGate.
The Athena Transient Store API.
::StatusCode StatusCode
StatusCode definition for legacy code.
CLID clID() const
Retrieve string key:
static StoreGateSvc * currentStoreGate()
get current StoreGate
Default, invalid implementation of ClassID_traits.
An AttributeList represents a logical row of attributes in a metadata table. The name and type of eac...
virtual bool isValid() override final
Can the handle be successfully dereferenced?
Gaudi::Property< std::string > m_attrListKey
void setProvider(IAddressProvider *provider, StoreID::type storeID)
std::unordered_set< std::string > m_dhFormKeys
Set of DataHeader form keys for which we've already done registerKeys.
virtual ~AthenaPoolAddressProviderSvc()
Destructor.
An AttributeList represents a logical row of attributes in a metadata table. The name and type of eac...
This file contains the class definition for the AthenaPoolAddressProviderSvc class.
static const Guid & null() noexcept
NULL-Guid: static class method.
This file contains the class definition for the TokenAddress class.
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
AthenaPoolAddressProviderSvc(const std::string &name, ISvcLocator *pSvcLocator)
Standard Service Constructor.
virtual StatusCode preLoadAddresses(StoreID::type storeID, IAddressProvider::tadList &tads) override
Get all addresses from provider.
std::list< SG::TransientAddress * > tadList
Handle class for reading from StoreGate.
virtual StatusCode initialize() override
Required of all Gaudi Services.
StoreGateSvc * eventStore() const
Return pointer to active event SG.