ATLAS Offline Software
CondProxyProvider.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef CONDPROXYPROVIDER_H
6 #define CONDPROXYPROVIDER_H
7 
13 #include "GaudiKernel/ServiceHandle.h"
14 #include "Gaudi/Property.h" /*no forward decl: typedef*/
18 #include <memory>
19 
20 // Forward declarations
21 namespace pool {
22  class ICollectionCursor;
23 }
24 class ISvcLocator;
26 class StoreGateSvc;
27 
31 class CondProxyProvider : public extends<AthService, IAddressProvider> {
32 public: // Constructor and Destructor
34  CondProxyProvider(const std::string& name, ISvcLocator* pSvcLocator);
36  virtual ~CondProxyProvider();
37 
39  virtual StatusCode initialize() override;
41  virtual StatusCode finalize() override;
42 
46  virtual StatusCode preLoadAddresses(StoreID::type storeID, IAddressProvider::tadList& tads) override;
47 
49  virtual StatusCode loadAddresses(StoreID::type storeID, IAddressProvider::tadList& tads) override;
50 
55  const EventContext& ctx) override;
56 
57 private: // data
58  ServiceHandle<IAthenaPoolCnvSvc> m_athenaPoolCnvSvc{this, "ConversionService", "AthenaPoolCnvSvc"};
59  unsigned int m_contextId;
60 
61 private: // properties
63  StringArrayProperty m_inputCollectionsProp
64  { this, "InputCollections", {}, "Files to read", "OrderedSet<std::string>" };
65  std::vector<std::string>::const_iterator m_inputCollectionsIterator{};
66 
67 private: // internal helper functions
69  std::unique_ptr<PoolCollectionConverter> getCollectionCnv();
70 };
71 
72 #endif
CondProxyProvider::getCollectionCnv
std::unique_ptr< PoolCollectionConverter > getCollectionCnv()
Return pointer to new PoolCollectionConverter.
Definition: CondProxyProvider.cxx:152
CondProxyProvider::preLoadAddresses
virtual StatusCode preLoadAddresses(StoreID::type storeID, IAddressProvider::tadList &tads) override
Get all addresses from provider.
Definition: CondProxyProvider.cxx:71
IAthenaPoolCnvSvc.h
This file contains the class definition for the IAthenaPoolCnvSvc interface class.
PoolCollectionConverter
This class provides an interface to POOL collections.
Definition: PoolCollectionConverter.h:27
pool
pool namespace
Definition: libname.h:15
SG::TransientAddress
Definition: TransientAddress.h:32
CondProxyProvider::updateAddress
virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress *tad, const EventContext &ctx) override
Update a transient address.
Definition: CondProxyProvider.cxx:146
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:120
CondProxyProvider::m_contextId
unsigned int m_contextId
Definition: CondProxyProvider.h:59
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CondProxyProvider::loadAddresses
virtual StatusCode loadAddresses(StoreID::type storeID, IAddressProvider::tadList &tads) override
Implementation of the loadAddresses function without any functionality.
Definition: CondProxyProvider.cxx:141
CondProxyProvider::m_athenaPoolCnvSvc
ServiceHandle< IAthenaPoolCnvSvc > m_athenaPoolCnvSvc
Definition: CondProxyProvider.h:58
CondProxyProvider::initialize
virtual StatusCode initialize() override
Required of all Gaudi Services.
Definition: CondProxyProvider.cxx:41
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
CondProxyProvider
This class is the AddressProvider for conditions data.
Definition: CondProxyProvider.h:31
CondProxyProvider::finalize
virtual StatusCode finalize() override
Required of all Gaudi Services.
Definition: CondProxyProvider.cxx:63
StoreID::type
type
Definition: StoreID.h:24
CondProxyProvider::~CondProxyProvider
virtual ~CondProxyProvider()
Destructor.
Definition: CondProxyProvider.cxx:38
CondProxyProvider::m_inputCollectionsProp
StringArrayProperty m_inputCollectionsProp
InputCollections, vector with names of the input collections.
Definition: CondProxyProvider.h:64
IAddressProvider::tadList
std::list< SG::TransientAddress * > tadList
Definition: IAddressProvider.h:32
AthService.h
CondProxyProvider::CondProxyProvider
CondProxyProvider(const std::string &name, ISvcLocator *pSvcLocator)
Standard Service Constructor.
Definition: CondProxyProvider.cxx:32
IAddressProvider.h
CondProxyProvider::m_inputCollectionsIterator
std::vector< std::string >::const_iterator m_inputCollectionsIterator
Definition: CondProxyProvider.h:65
ServiceHandle< IAthenaPoolCnvSvc >