19#include "GaudiKernel/ClassID.h"
20#include "GaudiKernel/StatusCode.h"
33 base_class(name, pSvcLocator),
45 return StatusCode::FAILURE;
53 m_contextId = poolSvc->getInputContext(
"Conditions");
61 return StatusCode::SUCCESS;
67 return StatusCode::SUCCESS;
74 std::unique_ptr<PoolCollectionConverter> poolCollectionConverter =
getCollectionCnv();
75 if (!poolCollectionConverter) {
76 return StatusCode::FAILURE;
79 std::unique_ptr<pool::ICollectionCursor> headerIterator = poolCollectionConverter->selectAll();
81 for (
int verNumber = 0; verNumber < 100; verNumber++) {
82 if (!headerIterator->next()) {
83 poolCollectionConverter->disconnectDb().ignore();
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>();
103 token->fromString(headerIterator->eventRef().toString());
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;
146 auto pCollCnv = std::make_unique<PoolCollectionConverter>(
"ImplicitCollection",
150 if (!pCollCnv->initialize().isSuccess()) {
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_INFO(x,...)
This file contains the class definition for the CondProxyProvider class.
This file contains the class definition for the IPoolSvc interface class.
This file contains the class definition for the PoolCollectionConverter class.
This file contains the class definition for the TokenAddress class.
std::unique_ptr< PoolCollectionConverter > getCollectionCnv()
Return pointer to new PoolCollectionConverter.
virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress *tad, const EventContext &ctx) override
Update a transient address.
ServiceHandle< IPoolSvc > m_poolSvc
virtual StatusCode initialize() override
Required of all Gaudi Services.
std::vector< std::string >::const_iterator m_inputCollectionsIterator
virtual StatusCode loadAddresses(StoreID::type storeID, IAddressProvider::tadList &tads) override
Implementation of the loadAddresses function without any functionality.
virtual ~CondProxyProvider()
Destructor.
ServiceHandle< IAthenaPoolCnvSvc > m_athenaPoolCnvSvc
CondProxyProvider(const std::string &name, ISvcLocator *pSvcLocator)
Standard Service Constructor.
virtual StatusCode preLoadAddresses(StoreID::type storeID, IAddressProvider::tadList &tads) override
Get all addresses from provider.
Gaudi::Property< std::vector< std::string > > m_inputCollectionsProp
InputCollections, vector with names of the input collections.
Simple smart pointer for Gaudi-style refcounted objects.
std::list< SG::TransientAddress * > tadList
This class provides the interface to the APR persistency software.
CLID clID() const
Retrieve string key:
const std::string & name() const
Get the primary (hashed) SG key.
a StoreGateSvc key with a version number.
This class provides a Generic Transient Address for POOL tokens.
void registerKeys(const DataHeaderElement &dhe, StoreGateSvc *store)
Register all hash keys for one DH Element.
static const DbType POOL_StorageType
Helper functions for registering hash keys with the SG service.
static constexpr CLID ID()