ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
AnalysisCommon
PATCore
python
HelperUtils.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
2
3
12
13
14
def
GetTool
(theTool):
15
"""
16
Try to get the underlying ROOT tool, if needed.
17
"""
18
try
:
19
theTool = theTool.getRootTool()
20
pass
21
except
AttributeError :
22
theTool = theTool
23
pass
24
return
theTool
25
26
27
28
def
SetToolProperties
( theTool, **kw ):
29
"""
30
Get all provided properties and overwrite the default values with them
31
"""
32
keys = sorted( kw.keys() )
33
for
key
in
keys:
34
if
hasattr( theTool, key ):
35
setattr( theTool, key, kw[key] )
36
pass
37
else
:
38
print
(
"(SetToolProperties) ERROR: Could NOT find property %s for tool with name %s"
% (key, theTool.getName()))
39
pass
40
pass
41
pass
python.HelperUtils.GetTool
GetTool(theTool)
============================================================================= Name: HelperUtils....
Definition
HelperUtils.py:14
python.HelperUtils.SetToolProperties
SetToolProperties(theTool, **kw)
Definition
HelperUtils.py:28
Generated on
for ATLAS Offline Software by
1.17.0