Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
manages the address providers and add proxies on demand to the store
More...
#include <ProxyProviderSvc.h>
manages the address providers and add proxies on demand to the store
Definition at line 41 of file ProxyProviderSvc.h.
◆ pAPiterator
◆ TAdIterator
◆ TAdList
◆ ProxyProviderSvc()
ProxyProviderSvc::ProxyProviderSvc |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
svcLoc |
|
) |
| |
◆ ~ProxyProviderSvc()
ProxyProviderSvc::~ProxyProviderSvc |
( |
| ) |
|
|
virtual |
◆ addAddress()
create a new Proxy, overriding CLID and/or key
Definition at line 183 of file ProxyProviderSvc.cxx.
188 bool resetOnly(tAddr.name().substr(0,10) != std::string(
"HLTAutoKey"));
198 <<
dp->clID() <<
"/" <<
dp->name());
205 for (
CLID clid : tClid) {
206 if (clid !=
dp->clID()) {
210 << clid <<
"/" <<
dp->name());
217 for (
const std::string&
alias :
dp->alias()) {
225 if (
std::find (tClid.begin(), tClid.end(), clid) == tClid.end()) {
227 dp->setTransientID (clid);
232 if (
std::find (tClid.begin(), tClid.end(), clid) == tClid.end()) {
234 dp->setTransientID (clid);
◆ addAddresses()
Add lists of TADs to the store.
- Parameters
-
store | Store to which to add. |
tList | List of TADs from all providers. |
if proxy exists, simply update the proxy with new TransientAddress, else construct a new proxy
Definition at line 157 of file ProxyProviderSvc.cxx.
166 proxy->setAddress(tad->address());
167 if (
proxy->provider() == 0) {
168 proxy->setProvider(tad->provider(),
store.storeID());
172 if ( 0 ==
addAddress(
store, std::move(*tad)) )
return StatusCode::FAILURE;
177 return StatusCode::SUCCESS;
◆ addProvider()
|
inlinefinaloverridevirtual |
◆ contextFromStore()
Retrieve the EventContext saved in store DS.
- Parameters
-
ds | The store from which to retrieve the context. |
If there is no context recorded in the store, return a default-initialized context.
Definition at line 273 of file ProxyProviderSvc.cxx.
278 EventContext* ctx = SG::DataProxy_cast<EventContext> (
proxy);
279 if (ctx)
return *ctx;
281 static const EventContext emptyContext;
◆ doPreLoadProxies()
StatusCode ProxyProviderSvc::doPreLoadProxies |
( |
IProxyRegistry & |
storeToModify | ) |
|
|
private |
Definition at line 101 of file ProxyProviderSvc.cxx.
103 if (
m_providers.empty())
return StatusCode::SUCCESS;
108 ATH_CHECK( provider->preLoadAddresses(storeID, tList) );
109 setProviderOnList (tList, provider, storeID);
112 return StatusCode::SUCCESS;
◆ initialize()
StatusCode ProxyProviderSvc::initialize |
( |
| ) |
|
|
overridevirtual |
◆ loadProxies()
StatusCode ProxyProviderSvc::loadProxies |
( |
IProxyRegistry & |
storeToModify | ) |
|
|
overridevirtual |
add proxies to the store to modify (during Begin Event)
IProxyProvider interface add proxies to the store to modify.
Definition at line 137 of file ProxyProviderSvc.cxx.
139 if (
m_providers.empty())
return StatusCode::SUCCESS;
144 ATH_CHECK( provider->loadAddresses(storeID, tList) );
145 setProviderOnList (tList, provider, storeID);
148 return StatusCode::SUCCESS;
◆ preLoadProxies()
StatusCode ProxyProviderSvc::preLoadProxies |
( |
IProxyRegistry & |
storeToModify | ) |
|
|
overridevirtual |
IProxyProvider interface.
IProxyProvider interface add proxies (before Begin Event)
add proxies to the store to modify (before Begin Event)
Definition at line 119 of file ProxyProviderSvc.cxx.
126 if (FSMState() == Gaudi::StateMachine::OFFLINE) {
128 return StatusCode::SUCCESS;
◆ providerNamesPropertyHandler()
void ProxyProviderSvc::providerNamesPropertyHandler |
( |
Gaudi::Details::PropertyBase & |
theProp | ) |
|
|
private |
the handler for m_providerNames
Definition at line 287 of file ProxyProviderSvc.cxx.
292 auto it =
std::find (providerNames.begin(), providerNames.end(),
293 "AddressRemappingSvc");
294 if (
it != providerNames.end() &&
it != providerNames.end()-1) {
295 providerNames.erase (
it);
296 providerNames.push_back (
"AddressRemappingSvc");
299 for (
const std::string& pName : providerNames) {
300 SmartIF<IAddressProvider> pAP{service(pName)};
303 throw GaudiException(
"Failed to locate address provider",
304 "ProxyProviderSvc::providerNamesPropertyHandle",
305 StatusCode::FAILURE);
◆ retrieveProxy()
Use a provider to create a proxy for ID/KEY.
If successful, the new proxy will be added to DATASTORE and returned; otherwise, return null.
Definition at line 247 of file ProxyProviderSvc.cxx.
254 for (; iProvider != iEnd; ++iProvider) {
255 if ( ((*iProvider)->updateAddress(
store.storeID(),&pTAd,ctx)).isSuccess() )
257 pTAd.setProvider(*iProvider,
store.storeID());
258 return this->
addAddress(store,std::move(pTAd));
◆ m_pDataLoader
◆ m_pendingLoad
◆ m_providerNames
StringArrayProperty ProxyProviderSvc::m_providerNames |
|
private |
Initial value:{this,"ProviderNames",{},
"names of the services to be use as address providers","OrderedSet<std::string>"}
property: the services declared as providers
Definition at line 102 of file ProxyProviderSvc.h.
◆ m_providers
The documentation for this class was generated from the following files:
std::list< IAddressProvider * >::iterator pAPiterator
std::string find(const std::string &s)
return a remapped string
a proxy registry (a read/write dictionary)
virtual void addProvider(IAddressProvider *aProvider) override final
IAddressProvider manager functionality add a provider to the set of known ones.
std::vector< IProxyRegistry * > m_pendingLoad
List of pending stores on which to run preLoadProxies().
StatusCode doPreLoadProxies(IProxyRegistry &storeToModify)
virtual SG::DataProxy * proxy_exact(SG::sgkey_t sgkey) const override
StringArrayProperty m_providerNames
property: the services declared as providers
std::vector< CLID > TransientClidSet
Strictly a set, but there shouldn't be more than a handful of entries, so store it as a sorted vector...
#define ATH_MSG_VERBOSE(x)
StatusCode addAddresses(IProxyRegistry &store, TAdList &tList)
Add lists of TADs to the store.
const std::vector< CLID > & get_bases() const
Return the class IDs of all known bases of T (that have class IDs).
SG::DataProxy * addAddress(IProxyRegistry &storeToModify, SG::TransientAddress &&tad)
create a new Proxy, overriding CLID and/or key
virtual StatusCode addToStore(CLID, SG::DataProxy *proxy) override
ServiceHandle< IConversionSvc > m_pDataLoader
Persistency Service.
std::list< IAddressProvider * > m_providers
the providers we know about. WE DON'T OWN THEM
Default, invalid implementation of ClassID_traits.
interface for IOA providers
std::vector< CLID > get_copy_conversions() const
Return known copy conversions.
uint32_t CLID
The Class ID type.
std::list< SG::TransientAddress * > TAdList
The non-template portion of the BaseInfo implementation.
const EventContext & contextFromStore(IProxyRegistry &ds) const
Retrieve the EventContext saved in store DS.
void providerNamesPropertyHandler(Gaudi::Details::PropertyBase &theProp)
the handler for m_providerNames