ATLAS Offline Software
Loading...
Searching...
No Matches
Control
SGComps
python
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
12
def
getAddressRemappingSvc
():
13
"""Return the AddressRemappingSvc configurable."""
14
from
AthenaCommon.AppMgr
import
ServiceMgr
as
svcMgr
15
from
SGComps.SGCompsConf
import
AddressRemappingSvc, ProxyProviderSvc
16
pps =
ProxyProviderSvc
()
17
ars =
AddressRemappingSvc
()
18
svcMgr += pps
19
svcMgr += ars
20
if
'AddressRemappingSvc'
not
in
pps.ProviderNames:
21
pps.ProviderNames += [
'AddressRemappingSvc'
]
22
return
ars
23
24
25
def
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
"""
43
ars =
getAddressRemappingSvc
()
44
ars.TypeKeyRenameMaps += [
'%s#%s->%s'
% (type, from_name, to_name) ]
45
return
46
47
48
def
addOverwrite
(from_type, from_name, to_type, to_name):
49
"""Add a new type overwrite mapping."""
50
ars =
getAddressRemappingSvc
()
51
ars.TypeKeyRenameMaps += [
'%s#%s->%s#%s'
% (from_type, from_name,
52
to_type, to_name) ]
53
return
54
AddressRemappingSvc
This class provides the interface to the LCG POOL persistency software.
Definition
AddressRemappingSvc.h:41
ProxyProviderSvc
manages the address providers and add proxies on demand to the store
Definition
ProxyProviderSvc.h:42
AddressRemappingSvc.addOverwrite
addOverwrite(from_type, from_name, to_type, to_name)
Definition
AddressRemappingSvc.py:48
AddressRemappingSvc.addInputRename
addInputRename(type, from_name, to_name)
Definition
AddressRemappingSvc.py:25
AddressRemappingSvc.getAddressRemappingSvc
getAddressRemappingSvc()
Definition
AddressRemappingSvc.py:12
Generated on
for ATLAS Offline Software by
1.14.0