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) |
Static Public Attributes | |
int | printHeaderWidth = 80 |
int | printHeaderPre = 3 |
Static Private Member Functions | |
def | _printHeader (title) |
def | _printFooter (title) |
Private Attributes | |
_props | |
Standalone Analysis Service Configuration This class is used to describe the configuration of an analysis service (a C++ class inheriting from asg::AsgService) 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.asg.Job() ... from AsgServices.AsgServiceConfig import AsgServiceConfig service = AsgServiceConfig( "asg::UnitTestService1/TestService", property = 1.23 ) service.string_property = "Foo" job.servicesAdd( service ) Note that the python code doesn't know what properties can actually be set on any given C++ service. Any mistake made in the Python configuration (apart from syntax errors) is only discovered while initialising the analysis job.
Definition at line 17 of file AsgServiceConfig.py.
def python.AsgServiceConfig.AsgServiceConfig.__init__ | ( | self, | |
typeAndName, | |||
** | kwargs | ||
) |
Constructor for an service configuration object Keyword arguments: typeAndName -- The type/instance name of the service Note that you can pass (initial) properties to the constructor like: service = AsgServiceConfig( "asg::UnitTestService1/TestService", property = 1.23 )
Definition at line 45 of file AsgServiceConfig.py.
def python.AsgServiceConfig.AsgServiceConfig.__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 services would match.
Definition at line 136 of file AsgServiceConfig.py.
def python.AsgServiceConfig.AsgServiceConfig.__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 service, to possibly use it in some configuration decisions in the Python code itself. Keyword arguments: name -- The name of the property
Definition at line 91 of file AsgServiceConfig.py.
def python.AsgServiceConfig.AsgServiceConfig.__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 151 of file AsgServiceConfig.py.
def python.AsgServiceConfig.AsgServiceConfig.__setattr__ | ( | self, | |
key, | |||
value | |||
) |
Set an service property on an existing configuration object This function allows us to set/override properties on an service configuration object. Allowing for the following syntax: service = ... service.IntProperty = 66 service.FloatProperty = 3.141592 service.StringProperty = "Foo" Keyword arguments: key -- The key/name of the property value -- The value to set for the property
Definition at line 110 of file AsgServiceConfig.py.
def python.AsgServiceConfig.AsgServiceConfig.__str__ | ( | self | ) |
Print the service 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 159 of file AsgServiceConfig.py.
|
staticprivate |
Produce a nice footer when printing the configuration This function is used for printing the footer of both services and tools. Keyword arguments: indentString -- String used as indentation title -- The title of the service/tool
Definition at line 241 of file AsgServiceConfig.py.
|
staticprivate |
Produce a nice header when printing the configuration This function is used for printing the header of both services and tools. Keyword arguments: indentString -- String used as indentation title -- The title of the service/tool
Definition at line 224 of file AsgServiceConfig.py.
def python.AsgServiceConfig.AsgServiceConfig.addPrivateTool | ( | self, | |
name, | |||
type | |||
) |
Create a private tool for the service This function is used in 'standalone' mode to declare a private tool for the service, 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 180 of file AsgServiceConfig.py.
def python.AsgServiceConfig.AsgServiceConfig.getName | ( | self | ) |
Get the instance name of the service This is for compatibility with the getName() function of Athena configurables.
Definition at line 73 of file AsgServiceConfig.py.
def python.AsgServiceConfig.AsgServiceConfig.getType | ( | self | ) |
Get the type name of the service This is for compatibility with the getType() function of Athena configurables.
Definition at line 82 of file AsgServiceConfig.py.
|
private |
Definition at line 63 of file AsgServiceConfig.py.
|
static |
Definition at line 43 of file AsgServiceConfig.py.
|
static |
Definition at line 42 of file AsgServiceConfig.py.