![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
15 #include "GaudiKernel/IClassIDSvc.h"
16 #include "GaudiKernel/IConversionSvc.h"
17 #include "GaudiKernel/ListItem.h"
18 #include "GaudiKernel/GaudiException.h"
19 #include "GaudiKernel/ServiceHandle.h"
23 #include "boost/range/adaptor/reversed.hpp"
39 if (!
clidsvc.retrieve())
return nullptr;
41 if (!
clidsvc->getTypeNameOfID (clid,
name).isSuccess()) {
44 (void)TClass::GetClass (
name.c_str());
53 base_class(
name, svcLoc){
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;
100 if (tad->provider() !=
nullptr)
break;
101 tad->setProvider (provider, storeID);
112 if (
m_providers.empty())
return StatusCode::SUCCESS;
118 setProviderOnList (tList, provider, storeID);
121 return StatusCode::SUCCESS;
135 if (FSMState() == Gaudi::StateMachine::OFFLINE) {
137 return StatusCode::SUCCESS;
148 if (
m_providers.empty())
return StatusCode::SUCCESS;
154 setProviderOnList (tList, provider, storeID);
157 return StatusCode::SUCCESS;
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;
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);
263 for (; iProvider != iEnd; ++iProvider) {
264 if ( ((*iProvider)->updateAddress(
store.storeID(),&pTAd,ctx)).isSuccess() )
267 return this->
addAddress(store,std::move(pTAd));
287 EventContext* ctx = SG::DataProxy_cast<EventContext> (
proxy);
288 if (ctx)
return *ctx;
290 static const EventContext emptyContext;
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);
std::list< IAddressProvider * >::iterator pAPiterator
ProxyProviderSvc(const std::string &name, ISvcLocator *svcLoc)
Standard Service Constructor.
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...
virtual StatusCode initialize() override
Service boilerplate.
#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 -----------------------------------------------------------------—
virtual StatusCode loadAddresses(StoreID::type, tadList &)
get all new addresses from Provider for this Event.
Assign a CLID to EventContext.
virtual StatusCode loadProxies(IProxyRegistry &storeToModify) override
add proxies to the store to modify (during Begin Event)
SG::DataProxy * addAddress(IProxyRegistry &storeToModify, SG::TransientAddress &&tad)
create a new Proxy, overriding CLID and/or key
manages the address providers and add proxies on demand to the store
std::list< IAddressProvider * > m_providers
the providers we know about. WE DON'T OWN THEM
Provide an interface for finding inheritance information at run time.
::StatusCode StatusCode
StatusCode definition for legacy code.
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.
virtual SG::DataProxy * retrieveProxy(const CLID &id, const std::string &key, IProxyRegistry &storeToModify) override
Use a provider to create a proxy for ID/KEY.
uint32_t CLID
The Class ID type.
void setProvider(IAddressProvider *provider, StoreID::type storeID)
static const BaseInfoBase * find(CLID clid)
Find the BaseInfoBase instance for clid.
virtual StatusCode preLoadProxies(IProxyRegistry &storeToModify) override
IProxyProvider interface.
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.
virtual StatusCode preLoadAddresses(StoreID::type, tadList &)
get all addresses from Provider : Called before Begin Event
virtual ~ProxyProviderSvc()
void providerNamesPropertyHandler(Gaudi::Details::PropertyBase &theProp)
the handler for m_providerNames