Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
21 #include "GaudiKernel/ClassID.h"
22 #include "GaudiKernel/StatusCode.h"
33 base_class(
name, pSvcLocator),
34 m_athenaPoolCnvSvc(
"AthenaPoolCnvSvc",
name),
35 m_poolCollectionConverter(0),
47 return(StatusCode::FAILURE);
64 if (m_poolCollectionConverter == 0) {
65 return(StatusCode::FAILURE);
67 return(StatusCode::SUCCESS);
71 if (m_poolCollectionConverter != 0) {
72 m_poolCollectionConverter->disconnectDb().ignore();
73 delete m_poolCollectionConverter; m_poolCollectionConverter = 0;
79 return(StatusCode::SUCCESS);
85 return(StatusCode::SUCCESS);
91 if (m_poolCollectionConverter ==
nullptr) {
92 return StatusCode::FAILURE;
97 for (
int verNumber = 0; verNumber < 100; verNumber++) {
98 if (!headerIterator->
next()) {
99 m_poolCollectionConverter->disconnectDb().ignore();
100 delete m_poolCollectionConverter; m_poolCollectionConverter = 0;
101 ++m_inputCollectionsIterator;
105 if (m_poolCollectionConverter == 0) {
106 return(StatusCode::FAILURE);
109 headerIterator = &m_poolCollectionConverter->selectAll();
110 if (!headerIterator->
next()) {
111 return(StatusCode::FAILURE);
118 auto token = std::make_unique<Token>();
121 if (!detectorStoreSvc->recordAddress(tokenAddr).isSuccess()) {
123 return(StatusCode::FAILURE);
126 std::list<SG::ObjectWithVersion<DataHeader> > allVersions;
127 if (!detectorStoreSvc->retrieveAllVersions(allVersions,
name()).isSuccess()) {
128 ATH_MSG_DEBUG(
"Cannot retrieve DataHeader from DetectorStore.");
129 return(StatusCode::SUCCESS);
132 iter != allVersions.end(); ++iter) {
134 ATH_MSG_DEBUG(
"The current File contains: " << dataHeader->
size() <<
" objects");
135 for (
const auto& element : *dataHeader) {
138 delete tadd; tadd = 0;
140 ATH_MSG_DEBUG(
"preLoadAddresses: DataObject address, clid = " << tadd->
clID() <<
", name = " << tadd->
name());
141 tads.push_back(tadd);
147 return(StatusCode::SUCCESS);
152 return(StatusCode::SUCCESS);
157 const EventContext& ) {
158 return(StatusCode::FAILURE);
162 ATH_MSG_DEBUG(
"Try item: \"" << *m_inputCollectionsIterator <<
"\" from the collection list.");
164 *m_inputCollectionsIterator,
169 delete pCollCnv; pCollCnv = 0;
170 ATH_MSG_ERROR(
"Unable to open: " << *m_inputCollectionsIterator);
JetConstituentVector::iterator iterator
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 IAthenaPoolCnvSvc interface class.
This class provides an interface to POOL collections.
This file contains the class definition for the PoolCollectionConverter class.
virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress *tad, const EventContext &ctx) override
Update a transient address.
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.
PoolCollectionConverter * getCollectionCnv()
Return pointer to new PoolCollectionConverter.
This file contains the class definition for the IPoolSvc interface class.
This file contains the class definition for the TokenAddress class.
StatusCode initialize()
Required by all Gaudi Services.
virtual StatusCode finalize() override
Required of all Gaudi Services.
#define ATH_MSG_WARNING(x)
virtual ~CondProxyProvider()
Destructor.
StringArrayProperty m_inputCollectionsProp
InputCollections, vector with names of the input collections.
std::list< SG::TransientAddress * > tadList
CondProxyProvider(const std::string &name, ISvcLocator *pSvcLocator)
Standard Service Constructor.
virtual const Token & eventRef() const =0
Returns the event reference Token for the current row.
associate a data object with its VersionedKey The object is held by a ReadHandle to delay its retriev...