|
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"
31 base_class(
name, pSvcLocator),
32 m_metaDataStore(
"MetaDataStore",
name),
33 m_clidSvc(
"ClassIDSvc",
name),
49 return(StatusCode::SUCCESS);
62 return(StatusCode::SUCCESS);
68 return(StatusCode::SUCCESS);
75 ATH_MSG_DEBUG(
"Cannot retrieve DataHeader from DetectorStore.");
76 return(StatusCode::SUCCESS);
79 for (
const auto& element : *dataHeader) {
82 delete tadd; tadd =
nullptr;
84 ATH_MSG_DEBUG(
"preLoadAddresses: DataObject address, clid = " << tadd->
clID() <<
", name = " << tadd->
name());
90 return(StatusCode::SUCCESS);
96 return(StatusCode::SUCCESS);
101 if (dataHeader ==
nullptr) {
103 if (!eventDataHeader.
isValid()) {
105 return(StatusCode::FAILURE);
107 dataHeader = eventDataHeader.
cptr();
112 std::string tokenStr;
115 tokenStr = (*attrList)[
"eventRef_secondary"].data<std::string>();
116 ATH_MSG_DEBUG(
"found AthenaAttribute, name = eventRef_secondary = " << tokenStr);
119 return (StatusCode::FAILURE);
123 return (StatusCode::FAILURE);
126 if (!
eventStore()->recordAddress(iop).isSuccess()) {
127 ATH_MSG_ERROR(
"Cannot record address to StoreGate with token string: " << tokenStr);
128 return(StatusCode::FAILURE);
132 ATH_MSG_DEBUG(
"The current Event contains: " << dataHeader->
size() <<
" objects");
133 for (
const auto& element : *dataHeader) {
136 delete tadd; tadd =
nullptr;
138 ATH_MSG_DEBUG(
"loadAddresses: DataObject address, clid = " << tadd->
clID() <<
", name = " << tadd->
name());
140 tads.push_back(tadd);
145 return(StatusCode::SUCCESS);
150 const EventContext& ) {
151 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.
static const Guid & null()
NULL-Guid: static class method.
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)
virtual ~AthenaPoolAddressProviderSvc()
Destructor.
virtual StatusCode finalize() override
Required of all Gaudi Services.
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.
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).
#define ATH_MSG_WARNING(x)
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.