![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
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 42 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 192 of file ProxyProviderSvc.cxx.
197 bool resetOnly(tAddr.name().substr(0,10) != std::string(
"HLTAutoKey"));
203 bool addedProxy =
store.addToStore(
dp->clID(),
dp).isSuccess();
207 <<
dp->clID() <<
"/" <<
dp->name());
214 for (
CLID clid : tClid) {
215 if (clid !=
dp->clID()) {
216 bool flag = (
store.addToStore(clid,
dp)).isSuccess();
219 << clid <<
"/" <<
dp->name());
226 for (
const std::string&
alias :
dp->alias()) {
234 if (
std::find (tClid.begin(), tClid.end(), clid) == tClid.end()) {
235 store.addToStore (clid,
dp).ignore();
236 dp->setTransientID (clid);
241 if (
std::find (tClid.begin(), tClid.end(), clid) == tClid.end()) {
242 store.addToStore (clid,
dp).ignore();
243 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 166 of file ProxyProviderSvc.cxx.
175 proxy->setAddress(tad->address());
176 if (
proxy->provider() == 0) {
177 proxy->setProvider(tad->provider(),
store.storeID());
181 if ( 0 ==
addAddress(
store, std::move(*tad)) )
return StatusCode::FAILURE;
186 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 282 of file ProxyProviderSvc.cxx.
287 EventContext* ctx = SG::DataProxy_cast<EventContext> (
proxy);
288 if (ctx)
return *ctx;
290 static const EventContext emptyContext;
◆ doPreLoadProxies()
StatusCode ProxyProviderSvc::doPreLoadProxies |
( |
IProxyRegistry & |
storeToModify | ) |
|
|
private |
Definition at line 110 of file ProxyProviderSvc.cxx.
112 if (
m_providers.empty())
return StatusCode::SUCCESS;
117 ATH_CHECK( provider->preLoadAddresses(storeID, tList) );
118 setProviderOnList (tList, provider, storeID);
121 return StatusCode::SUCCESS;
◆ initialize()
StatusCode ProxyProviderSvc::initialize |
( |
| ) |
|
|
overridevirtual |
Service boilerplate.
Definition at line 60 of file ProxyProviderSvc.cxx.
64 const bool CREATEIF(
true);
66 if (!(service(
"EventPersistencySvc",
m_pDataLoader, CREATEIF)).isSuccess()) {
68 ATH_MSG_ERROR(
"Could not get pointer to Persistency Service");
69 return StatusCode::FAILURE;
78 return StatusCode::FAILURE;
87 return StatusCode::SUCCESS;
◆ 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 146 of file ProxyProviderSvc.cxx.
148 if (
m_providers.empty())
return StatusCode::SUCCESS;
153 ATH_CHECK( provider->loadAddresses(storeID, tList) );
154 setProviderOnList (tList, provider, storeID);
157 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 128 of file ProxyProviderSvc.cxx.
135 if (FSMState() == Gaudi::StateMachine::OFFLINE) {
137 return StatusCode::SUCCESS;
◆ providerNamesPropertyHandler()
void ProxyProviderSvc::providerNamesPropertyHandler |
( |
Gaudi::Details::PropertyBase & |
theProp | ) |
|
|
private |
the handler for m_providerNames
Definition at line 296 of file ProxyProviderSvc.cxx.
301 auto it =
std::find (providerNames.begin(), providerNames.end(),
302 "AddressRemappingSvc");
303 if (
it != providerNames.end() &&
it != providerNames.end()-1) {
304 providerNames.erase (
it);
305 providerNames.push_back (
"AddressRemappingSvc");
308 for (
const std::string& pName : providerNames) {
312 if (!(service(tn.type(), tn.name(), pIS)).isSuccess() ||
315 throw GaudiException(
"Failed to locate address provider",
316 "ProxyProviderSvc::providerNamesPropertyHandle",
317 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 256 of file ProxyProviderSvc.cxx.
263 for (; iProvider != iEnd; ++iProvider) {
264 if ( ((*iProvider)->updateAddress(
store.storeID(),&pTAd,ctx)).isSuccess() )
266 pTAd.setProvider(*iProvider,
store.storeID());
267 return this->
addAddress(store,std::move(pTAd));
◆ m_pDataLoader
IConversionSvc* ProxyProviderSvc::m_pDataLoader {nullptr} |
|
private |
◆ 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 103 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)
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).
reg
globals -----------------------------------------------------------------—
SG::DataProxy * addAddress(IProxyRegistry &storeToModify, SG::TransientAddress &&tad)
create a new Proxy, overriding CLID and/or key
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.
#define CHECK(...)
Evaluate an expression and check for errors.
uint32_t CLID
The Class ID type.
std::list< SG::TransientAddress * > TAdList
IConversionSvc * m_pDataLoader
Persistency Service.
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