![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
20 #include "GaudiKernel/ClassID.h"
21 #include "GaudiKernel/StatusCode.h"
33 m_athenaPoolCnvSvc(
"AthenaPoolCnvSvc",
name),
34 m_poolCollectionConverter(0),
46 return(StatusCode::FAILURE);
50 return(StatusCode::FAILURE);
55 return(StatusCode::FAILURE);
63 return(StatusCode::FAILURE);
72 if (m_poolCollectionConverter == 0) {
73 return(StatusCode::FAILURE);
75 return(StatusCode::SUCCESS);
79 if (m_poolCollectionConverter != 0) {
80 m_poolCollectionConverter->disconnectDb().ignore();
81 delete m_poolCollectionConverter; m_poolCollectionConverter = 0;
91 return(::AthService::queryInterface(riid, ppvInterface));
97 return(StatusCode::SUCCESS);
101 if (!detectorStoreSvc.retrieve().isSuccess()) {
103 return(StatusCode::FAILURE);
106 if (m_poolCollectionConverter ==
nullptr) {
107 return StatusCode::FAILURE;
112 for (
int verNumber = 0; verNumber < 100; verNumber++) {
113 if (!headerIterator->
next()) {
114 m_poolCollectionConverter->disconnectDb().ignore();
115 delete m_poolCollectionConverter; m_poolCollectionConverter = 0;
116 ++m_inputCollectionsIterator;
120 if (m_poolCollectionConverter == 0) {
121 return(StatusCode::FAILURE);
124 headerIterator = &m_poolCollectionConverter->executeQuery();
125 if (!headerIterator->
next()) {
126 return(StatusCode::FAILURE);
136 if (!detectorStoreSvc->recordAddress(tokenAddr).isSuccess()) {
138 return(StatusCode::FAILURE);
141 std::list<SG::ObjectWithVersion<DataHeader> > allVersions;
142 if (!detectorStoreSvc->retrieveAllVersions(allVersions,
name()).isSuccess()) {
143 ATH_MSG_DEBUG(
"Cannot retrieve DataHeader from DetectorStore.");
144 return(StatusCode::SUCCESS);
147 iter != allVersions.end(); ++iter) {
149 ATH_MSG_DEBUG(
"The current File contains: " << dataHeader->
size() <<
" objects");
150 for (
const auto& element : *dataHeader) {
153 delete tadd; tadd = 0;
155 ATH_MSG_DEBUG(
"preLoadAddresses: DataObject address, clid = " << tadd->
clID() <<
", name = " << tadd->
name());
156 tads.push_back(tadd);
161 if (!detectorStoreSvc.release().isSuccess()) {
164 return(StatusCode::SUCCESS);
169 return(StatusCode::SUCCESS);
174 const EventContext& ) {
175 return(StatusCode::FAILURE);
179 ATH_MSG_DEBUG(
"Try item: \"" << *m_inputCollectionsIterator <<
"\" from the collection list.");
181 *m_inputCollectionsIterator,
187 delete pCollCnv; pCollCnv = 0;
188 ATH_MSG_ERROR(
"Unable to open: " << *m_inputCollectionsIterator);
JetConstituentVector::iterator iterator
virtual StatusCode finalize()
Required of all Gaudi Services.
Helper functions for registering hash keys with the SG service.
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
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 bool next()=0
Advances the cursor to the next row of the query result set.
virtual StatusCode preLoadAddresses(StoreID::type storeID, IAddressProvider::tadList &tads)
Get all addresses from provider.
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.
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 queryInterface(const InterfaceID &riid, void **ppvInterface)
Does this object satisfy a given interface? See Gaudi documentation for details.
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.
#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...
virtual StatusCode loadAddresses(StoreID::type storeID, IAddressProvider::tadList &tads)
Implementation of the loadAddresses function without any functionality.
virtual StatusCode initialize()
Required of all Gaudi Services.
virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress *tad, const EventContext &ctx)
Update a transient address.