 |
ATLAS Offline Software
|
Go to the documentation of this file.
20 #include "GaudiKernel/ClassID.h"
21 #include "GaudiKernel/StatusCode.h"
34 base_class(
name, pSvcLocator),
46 return StatusCode::FAILURE;
61 return StatusCode::SUCCESS;
67 return StatusCode::SUCCESS;
74 std::unique_ptr<PoolCollectionConverter> poolCollectionConverter =
getCollectionCnv();
75 if (!poolCollectionConverter) {
76 return StatusCode::FAILURE;
81 for (
int verNumber = 0; verNumber < 100; verNumber++) {
82 if (!headerIterator->
next()) {
84 poolCollectionConverter.reset();
89 if (!poolCollectionConverter) {
90 return StatusCode::FAILURE;
93 headerIterator = &poolCollectionConverter->
selectAll();
94 if (!headerIterator->
next()) {
95 return StatusCode::FAILURE;
102 auto token = std::make_unique<Token>();
106 if (!detectorStoreSvc->recordAddress(std::move(tokenAddr)).isSuccess()) {
108 return StatusCode::FAILURE;
111 std::list<SG::ObjectWithVersion<DataHeader> > allVersions;
112 if (!detectorStoreSvc->retrieveAllVersions(allVersions,
name()).isSuccess()) {
113 ATH_MSG_DEBUG(
"Cannot retrieve DataHeader from DetectorStore.");
114 return StatusCode::SUCCESS;
116 for (
const auto&
version : allVersions) {
118 ATH_MSG_DEBUG(
"The current File contains: " << dataHeader->
size() <<
" objects");
119 for (
const auto& element : *dataHeader) {
122 delete tadd; tadd = 0;
124 ATH_MSG_DEBUG(
"preLoadAddresses: DataObject address, clid = " << tadd->
clID() <<
", name = " << tadd->
name());
125 tads.push_back(tadd);
130 return StatusCode::SUCCESS;
135 return StatusCode::SUCCESS;
140 const EventContext& ) {
141 return StatusCode::FAILURE;
150 if (!pCollCnv->initialize().isSuccess()) {
std::unique_ptr< PoolCollectionConverter > getCollectionCnv()
Return pointer to new PoolCollectionConverter.
virtual StatusCode preLoadAddresses(StoreID::type storeID, IAddressProvider::tadList &tads) override
Get all addresses from provider.
Helper functions for registering hash keys with the SG service.
This class provides the interface to the LCG POOL persistency software.
This file contains the class definition for the PoolCollectionConverter class.
pool::ICollectionCursor & selectAll()
virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress *tad, const EventContext &ctx) override
Update a transient address.
Simple smart pointer for Gaudi-style refcounted objects.
virtual bool next()=0
Advances the cursor to the next row of the query result set.
This file contains the class definition for the CondProxyProvider class.
This class provides a Generic Transient Address for POOL tokens.
const std::string & name() const
Get the primary (hashed) SG key.
void registerKeys(const DataHeaderElement &dhe, StoreGateSvc *store)
Register all hash keys for one DH Element.
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual StatusCode loadAddresses(StoreID::type storeID, IAddressProvider::tadList &tads) override
Implementation of the loadAddresses function without any functionality.
a StoreGateSvc key with a version number. Notice that StoreGate does not order multiple instances of ...
CLID clID() const
Retrieve string key:
Default, invalid implementation of ClassID_traits.
ServiceHandle< IAthenaPoolCnvSvc > m_athenaPoolCnvSvc
virtual StatusCode initialize() override
Required of all Gaudi Services.
static constexpr const char * DataHeader
virtual const std::string toString() const
Retrieve the string representation of the token.
This file contains the class definition for the IPoolSvc interface class.
This file contains the class definition for the TokenAddress class.
StatusCode disconnectDb()
Disconnect Database.
virtual ~CondProxyProvider()
Destructor.
std::list< SG::TransientAddress * > tadList
CondProxyProvider(const std::string &name, ISvcLocator *pSvcLocator)
Standard Service Constructor.
Gaudi::Property< std::vector< std::string > > m_inputCollectionsProp
InputCollections, vector with names of the input collections.
virtual const Token & eventRef() const =0
Returns the event reference Token for the current row.
std::vector< std::string >::const_iterator m_inputCollectionsIterator