19#include "GaudiKernel/ClassID.h"
20#include "GaudiKernel/StatusCode.h"
33 base_class(name, pSvcLocator),
45 return StatusCode::FAILURE;
52 m_contextId = poolSvc->getInputContext(
"Conditions");
60 return StatusCode::SUCCESS;
66 return StatusCode::SUCCESS;
73 std::unique_ptr<PoolCollectionConverter> poolCollectionConverter =
getCollectionCnv();
74 if (!poolCollectionConverter) {
75 return StatusCode::FAILURE;
80 for (
int verNumber = 0; verNumber < 100; verNumber++) {
81 if (!headerIterator->
next()) {
82 poolCollectionConverter->disconnectDb().ignore();
83 poolCollectionConverter.reset();
88 if (!poolCollectionConverter) {
89 return StatusCode::FAILURE;
92 headerIterator = &poolCollectionConverter->selectAll();
93 if (!headerIterator->
next()) {
94 return StatusCode::FAILURE;
101 auto token = std::make_unique<Token>();
105 if (!detectorStoreSvc->recordAddress(std::move(tokenAddr)).isSuccess()) {
107 return StatusCode::FAILURE;
110 std::list<SG::ObjectWithVersion<DataHeader> > allVersions;
111 if (!detectorStoreSvc->retrieveAllVersions(allVersions, name()).isSuccess()) {
112 ATH_MSG_DEBUG(
"Cannot retrieve DataHeader from DetectorStore.");
113 return StatusCode::SUCCESS;
115 for (
const auto& version : allVersions) {
117 ATH_MSG_DEBUG(
"The current File contains: " << dataHeader->size() <<
" objects");
118 for (
const auto& element : *dataHeader) {
121 delete tadd; tadd = 0;
123 ATH_MSG_DEBUG(
"preLoadAddresses: DataObject address, clid = " << tadd->
clID() <<
", name = " << tadd->
name());
124 tads.push_back(tadd);
129 return StatusCode::SUCCESS;
134 return StatusCode::SUCCESS;
139 const EventContext& ) {
140 return StatusCode::FAILURE;
145 auto pCollCnv = std::make_unique<PoolCollectionConverter>(
"ImplicitCollection",
149 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.