20#include "GaudiKernel/ClassID.h"
21#include "GaudiKernel/StatusCode.h"
34 base_class(name, pSvcLocator),
46 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;
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>();
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()) {
#define ATH_CHECK
Evaluate an expression and check for errors.
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.
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 LCG POOL 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.
virtual const std::string toString() const
Retrieve the string representation of the token.
An interface used to navigate the result of a query on a collection.
virtual bool next()=0
Advances the cursor to the next row of the query result set.
virtual const Token & eventRef() const =0
Returns the event reference Token for the current row.
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 const char * DataHeader