ATLAS Offline Software
Loading...
Searching...
No Matches
AddressRemappingSvc.py
Go to the documentation of this file.
1# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
2
3#
4# $Id$
5#
6# File: SGComps/python/AddressRemappingSvc.py
7# Created: Sep 2016, sss
8# Purpose: Helpers for configuring the AddressRemappingSvc.
9#
10
11
13 """Return the AddressRemappingSvc configurable."""
14 from AthenaCommon.AppMgr import ServiceMgr as svcMgr
15 from SGComps.SGCompsConf import AddressRemappingSvc, ProxyProviderSvc
16 pps = ProxyProviderSvc()
18 svcMgr += pps
19 svcMgr += ars
20 if 'AddressRemappingSvc' not in pps.ProviderNames:
21 pps.ProviderNames += [ 'AddressRemappingSvc' ]
22 return ars
23
24
25def addInputRename (type, from_name, to_name):
26 """Add a new input renaming.
27
28 For example:
29
30 addInputRename ("Foo", "foo", "bar")
31
32 to rename the object of type Foo named `foo' to `bar'.
33
34 May also be used to rename dynamic (but NOT static) auxiliary variables:
35
36 addInputRename ("Foo", "foo.d1", "foo.x1")
37
38 If both are combined, write it like this:
39
40 addInputRename ("Foo", "foo", "bar")
41 addInputRename ("Foo", "foo.d1", "bar.x1")
42"""
44 ars.TypeKeyRenameMaps += [ '%s#%s->%s' % (type, from_name, to_name) ]
45 return
46
47
48def addOverwrite (from_type, from_name, to_type, to_name):
49 """Add a new type overwrite mapping."""
51 ars.TypeKeyRenameMaps += [ '%s#%s->%s#%s' % (from_type, from_name,
52 to_type, to_name) ]
53 return
54
This class provides the interface to the LCG POOL persistency software.
manages the address providers and add proxies on demand to the store
addOverwrite(from_type, from_name, to_type, to_name)
addInputRename(type, from_name, to_name)