Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Functions
python.HelperUtils Namespace Reference

Functions

def GetTool (theTool)
 
def SetToolProperties (theTool, **kw)
 

Function Documentation

◆ GetTool()

def python.HelperUtils.GetTool (   theTool)
Try to get the underlying ROOT tool, if needed.

Definition at line 15 of file HelperUtils.py.

15 def GetTool(theTool):
16  """
17  Try to get the underlying ROOT tool, if needed.
18  """
19  try:
20  theTool = theTool.getRootTool()
21  pass
22  except AttributeError :
23  theTool = theTool
24  pass
25  return theTool
26 
27 
28 

◆ SetToolProperties()

def python.HelperUtils.SetToolProperties (   theTool,
**  kw 
)
Get all provided properties and overwrite the default values with them

Definition at line 29 of file HelperUtils.py.

29 def SetToolProperties( theTool, **kw ):
30  """
31  Get all provided properties and overwrite the default values with them
32  """
33  keys = sorted( kw.keys() )
34  for key in keys:
35  if hasattr( theTool, key ):
36  setattr( theTool, key, kw[key] )
37  pass
38  else:
39  print ("(SetToolProperties) ERROR: Could NOT find property %s for tool with name %s" % (key, theTool.getName()))
40  pass
41  pass
42  pass
DerivationFramework::TriggerMatchingUtils::sorted
std::vector< typename R::value_type > sorted(const R &r, PROJ proj={})
Helper function to create a sorted vector from an unsorted range.
python.HelperUtils.SetToolProperties
def SetToolProperties(theTool, **kw)
Definition: HelperUtils.py:29
python.HelperUtils.GetTool
def GetTool(theTool)
Definition: HelperUtils.py:15