ATLAS Offline Software
|
Public Member Functions | |
def | __init__ (self, typeAndName, **kwargs) |
def | getName (self) |
def | getType (self) |
def | __getattr__ (self, name) |
def | __setattr__ (self, key, value) |
def | __eq__ (self, other) |
def | __ne__ (self, other) |
def | __str__ (self) |
def | addPrivateTool (self, name, type) |
def | addPrivateToolInArray (self, name, type) |
Static Public Attributes | |
int | printHeaderWidth = 80 |
int | printHeaderPre = 3 |
Static Private Member Functions | |
def | _printHeader (title) |
def | _printFooter (title) |
Private Attributes | |
_props | |
Standalone Analysis Algorithm Configuration This class is used to describe the configuration of an analysis algorithm (a C++ class inheriting from EL::AnaAlgorithm) in Python. It behaves similar to an Athena configurable, but is implemented in a much simpler way. An example of using it in configuring an EventLoop job could look like: job = ROOT.EL.Job() ... from AnaAlgorithm.AnaAlgorithmConfig import AnaAlgorithmConfig alg = AnaAlgorithmConfig( "EL::UnitTestAlg2/TestAlg", property = 1.23 ) alg.string_property = "Foo" job.algsAdd( alg ) Note that the python code doesn't know what properties can actually be set on any given C++ algorithm. Any mistake made in the Python configuration (apart from syntax errors) is only discovered while initialising the analysis job.
Definition at line 8 of file AnaAlgorithmConfig.py.
def python.AnaAlgorithmConfig.AnaAlgorithmConfig.__init__ | ( | self, | |
typeAndName, | |||
** | kwargs | ||
) |
Constructor for an algorithm configuration object Keyword arguments: typeAndName -- The type/instance name of the algorithm Note that you can pass (initial) properties to the constructor like: alg = AnaAlgorithmConfig( "EL::UnitTestAlg2/TestAlg", property = 1.23 )
Definition at line 36 of file AnaAlgorithmConfig.py.
def python.AnaAlgorithmConfig.AnaAlgorithmConfig.__eq__ | ( | self, | |
other | |||
) |
Check for equality with another object The implementation of this is very simple. We only check that the type and the name of the algorithms would match.
Definition at line 127 of file AnaAlgorithmConfig.py.
def python.AnaAlgorithmConfig.AnaAlgorithmConfig.__getattr__ | ( | self, | |
name | |||
) |
Get a previously set property value from the configuration This function allows us to retrieve the value of a property that was already set for the algorithm, to possibly use it in some configuration decisions in the Python code itself. Keyword arguments: name -- The name of the property
Definition at line 82 of file AnaAlgorithmConfig.py.
def python.AnaAlgorithmConfig.AnaAlgorithmConfig.__ne__ | ( | self, | |
other | |||
) |
Check for an inequality with another object This is just defined to make the '!=' operator of Python behave consistently with the '==' operator for such objects.
Definition at line 142 of file AnaAlgorithmConfig.py.
def python.AnaAlgorithmConfig.AnaAlgorithmConfig.__setattr__ | ( | self, | |
key, | |||
value | |||
) |
Set an algorithm property on an existing configuration object This function allows us to set/override properties on an algorithm configuration object. Allowing for the following syntax: alg = ... alg.IntProperty = 66 alg.FloatProperty = 3.141592 alg.StringProperty = "Foo" Keyword arguments: key -- The key/name of the property value -- The value to set for the property
Definition at line 101 of file AnaAlgorithmConfig.py.
def python.AnaAlgorithmConfig.AnaAlgorithmConfig.__str__ | ( | self | ) |
Print the algorithm configuration in a user friendly way This is just to help with debugging configurations, allowing the user to get a nice printout of their job configuration.
Definition at line 150 of file AnaAlgorithmConfig.py.
|
staticprivate |
Produce a nice footer when printing the configuration This function is used for printing the footer of both algorithms and tools. Keyword arguments: indentString -- String used as indentation title -- The title of the algorithm/tool
Definition at line 278 of file AnaAlgorithmConfig.py.
|
staticprivate |
Produce a nice header when printing the configuration This function is used for printing the header of both algorithms and tools. Keyword arguments: indentString -- String used as indentation title -- The title of the algorithm/tool
Definition at line 261 of file AnaAlgorithmConfig.py.
def python.AnaAlgorithmConfig.AnaAlgorithmConfig.addPrivateTool | ( | self, | |
name, | |||
type | |||
) |
Create a private tool for the algorithm This function is used in 'standalone' mode to declare a private tool for the algorithm, or a private tool for an already declared private tool. Can be used like: config.addPrivateTool( 'tool1', 'ToolType1' ) config.addPrivateTool( 'tool1.tool2', 'ToolType2' ) Keyword arguments: name -- The full name of the private tool type -- The C++ type of the private tool
Definition at line 176 of file AnaAlgorithmConfig.py.
def python.AnaAlgorithmConfig.AnaAlgorithmConfig.addPrivateToolInArray | ( | self, | |
name, | |||
type | |||
) |
Create a private tool in an array for the algorithm This function is used in 'standalone' mode to declare a private tool in a tool array for the algorithm, or a private tool in a tool array for an already declared private tool. Can be used like: tool = config.addPrivateToolInArray( 'tool1', 'ToolType1' ) tool = config.addPrivateToolInArray( 'tool1.tool2', 'ToolType2' ) Keyword arguments: name -- The full name of the private tool type -- The C++ type of the private tool
Definition at line 219 of file AnaAlgorithmConfig.py.
def python.AnaAlgorithmConfig.AnaAlgorithmConfig.getName | ( | self | ) |
Get the instance name of the algorithm This is for compatibility with the getName() function of Athena configurables.
Definition at line 64 of file AnaAlgorithmConfig.py.
def python.AnaAlgorithmConfig.AnaAlgorithmConfig.getType | ( | self | ) |
Get the type name of the algorithm This is for compatibility with the getType() function of Athena configurables.
Definition at line 73 of file AnaAlgorithmConfig.py.
|
private |
Definition at line 54 of file AnaAlgorithmConfig.py.
|
static |
Definition at line 34 of file AnaAlgorithmConfig.py.
|
static |
Definition at line 33 of file AnaAlgorithmConfig.py.