|  | 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 185 of file ProxyProviderSvc.cxx.
  190   bool resetOnly(tAddr.name().substr(0,10) != std::string(
"HLTAutoKey"));
 
  200                    << 
dp->clID() << 
"/" << 
dp->name());
 
  207     for (
CLID clid : tClid) {
 
  208       if (clid != 
dp->clID()) {
 
  212                          << clid << 
"/" << 
dp->name());
 
  219     for (
const std::string& 
alias : 
dp->alias()) {
 
  227         if (
std::find (tClid.begin(), tClid.end(), clid) == tClid.end()) {
 
  229           dp->setTransientID (clid);
 
  234         if (
std::find (tClid.begin(), tClid.end(), clid) == tClid.end()) {
 
  236           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 158 of file ProxyProviderSvc.cxx.
  168       proxy->setAddress(tad->address());
 
  169       if (
proxy->provider() == 0) {
 
  170         proxy->setProvider(tad->provider(), 
store.storeID());
 
  174       if ( 0 == 
addAddress(
store, std::move(*tad)) ) 
return StatusCode::FAILURE;
 
  179   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 275 of file ProxyProviderSvc.cxx.
  280     EventContext* ctx = SG::DataProxy_cast<EventContext> (
proxy);
 
  281     if (ctx) 
return *ctx;
 
  283   static const EventContext emptyContext;
 
 
 
 
◆ doPreLoadProxies()
  
  | 
        
          | StatusCode ProxyProviderSvc::doPreLoadProxies | ( | IProxyRegistry & | storeToModify | ) |  |  | private | 
 
Definition at line 102 of file ProxyProviderSvc.cxx.
  104   if (
m_providers.empty()) 
return StatusCode::SUCCESS;
 
  109     ATH_CHECK( provider->preLoadAddresses(storeID, tList) );
 
  110     setProviderOnList (tList, provider, storeID);
 
  113   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 138 of file ProxyProviderSvc.cxx.
  140   if (
m_providers.empty()) 
return StatusCode::SUCCESS;
 
  145     ATH_CHECK( provider->loadAddresses(storeID, tList) );
 
  146     setProviderOnList (tList, provider, storeID);
 
  149   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 120 of file ProxyProviderSvc.cxx.
  127   if (FSMState() == Gaudi::StateMachine::OFFLINE) {
 
  129     return StatusCode::SUCCESS;
 
 
 
 
◆ providerNamesPropertyHandler()
  
  | 
        
          | void ProxyProviderSvc::providerNamesPropertyHandler | ( | Gaudi::Details::PropertyBase & | theProp | ) |  |  | private | 
 
the handler for m_providerNames 
Definition at line 289 of file ProxyProviderSvc.cxx.
  294   auto it = 
std::find (providerNames.begin(), providerNames.end(),
 
  295                        "AddressRemappingSvc");
 
  296   if (
it != providerNames.end() &&  
it != providerNames.end()-1) {
 
  297     providerNames.erase (
it);
 
  298     providerNames.push_back (
"AddressRemappingSvc");
 
  301   for (
const std::string& pName : providerNames) {
 
  302     SmartIF<IAddressProvider> pAP{service(pName)};
 
  305       throw GaudiException(
"Failed to locate address provider",
 
  306                "ProxyProviderSvc::providerNamesPropertyHandle", 
 
  307                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 249 of file ProxyProviderSvc.cxx.
  256     for (; iProvider != iEnd; ++iProvider) {
 
  257       if ( ((*iProvider)->updateAddress(
store.storeID(),&pTAd,ctx)).isSuccess() ) 
 
  259       pTAd.setProvider(*iProvider, 
store.storeID());
 
  260       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.
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
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