|
ATLAS Offline Software
|
Go to the documentation of this file.
20 #include "GaudiKernel/ClassID.h"
21 #include "GaudiKernel/StatusCode.h"
32 base_class(
name, pSvcLocator),
33 m_athenaPoolCnvSvc(
"AthenaPoolCnvSvc",
name),
34 m_poolCollectionConverter(0),
46 return(StatusCode::FAILURE);
63 if (m_poolCollectionConverter == 0) {
64 return(StatusCode::FAILURE);
66 return(StatusCode::SUCCESS);
70 if (m_poolCollectionConverter != 0) {
71 m_poolCollectionConverter->disconnectDb().ignore();
72 delete m_poolCollectionConverter; m_poolCollectionConverter = 0;
78 return(StatusCode::SUCCESS);
84 return(StatusCode::SUCCESS);
90 if (m_poolCollectionConverter ==
nullptr) {
91 return StatusCode::FAILURE;
96 for (
int verNumber = 0; verNumber < 100; verNumber++) {
97 if (!headerIterator->
next()) {
98 m_poolCollectionConverter->disconnectDb().ignore();
99 delete m_poolCollectionConverter; m_poolCollectionConverter = 0;
100 ++m_inputCollectionsIterator;
104 if (m_poolCollectionConverter == 0) {
105 return(StatusCode::FAILURE);
108 headerIterator = &m_poolCollectionConverter->executeQuery();
109 if (!headerIterator->
next()) {
110 return(StatusCode::FAILURE);
120 if (!detectorStoreSvc->recordAddress(tokenAddr).isSuccess()) {
122 return(StatusCode::FAILURE);
125 std::list<SG::ObjectWithVersion<DataHeader> > allVersions;
126 if (!detectorStoreSvc->retrieveAllVersions(allVersions,
name()).isSuccess()) {
127 ATH_MSG_DEBUG(
"Cannot retrieve DataHeader from DetectorStore.");
128 return(StatusCode::SUCCESS);
131 iter != allVersions.end(); ++iter) {
133 ATH_MSG_DEBUG(
"The current File contains: " << dataHeader->
size() <<
" objects");
134 for (
const auto& element : *dataHeader) {
137 delete tadd; tadd = 0;
139 ATH_MSG_DEBUG(
"preLoadAddresses: DataObject address, clid = " << tadd->
clID() <<
", name = " << tadd->
name());
140 tads.push_back(tadd);
146 return(StatusCode::SUCCESS);
151 return(StatusCode::SUCCESS);
156 const EventContext& ) {
157 return(StatusCode::FAILURE);
161 ATH_MSG_DEBUG(
"Try item: \"" << *m_inputCollectionsIterator <<
"\" from the collection list.");
163 *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 token that identifies in a unique way objects on the persistent storage.
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.
Token & fromString(const std::string &from)
Build from the string representation of a token.
::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.
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...