![]() |
Belle II Software prerelease-10-00-00a
|
Public Member Functions | |
__init__ (self, module, condition=None) | |
condition (self) | |
event (self) | |
wrapper_name (self) | |
param (self) | |
available_params (self) | |
compose_wrapped_module_name (self, module) | |
get_name (self) | |
initialize (self) | |
beginRun (self) | |
endRun (self) | |
terminate (self) | |
Public Attributes | |
condition = condition | |
Condition function called at each event to determine if wrapped module should be executed. | |
module = module | |
The wrapped module. | |
Wrapper module to conditionally execute module and continue with the normal path afterwards. There are two ways to specify the condition. One way is to override the condition(self) method in a subclass. The second way is to give a function as the second argument to the module constructor, which is called each event. Attributes: module (basf2.Module): The module executed, if the condition is met. condition (function() -> bool, optional): Function executed at each event to determine, if the given module shall be executed. If None call the condition method instead, which can be overridden by subclasses.
Definition at line 165 of file metamodules.py.
__init__ | ( | self, | |
module, | |||
condition = None ) |
Initialisation method taking the module instance to be wrapped. Args: module (basf2.Module): The module executed, if the condition is met. condition (function() -> bool, optional): Function executed at each event to determine, if the given module shall be executed. If None call the condition method instead, which can be overridden by subclasses.
Definition at line 183 of file metamodules.py.
|
inherited |
Forwards the available parameters
Definition at line 78 of file metamodules.py.
|
inherited |
Begin run method of the module
Definition at line 94 of file metamodules.py.
|
inherited |
Compose a name that indicates the wrapped module.
Definition at line 82 of file metamodules.py.
condition | ( | self | ) |
Condition method called if not given a condition function during construction. Can be overridden by a concrete subclass to specify under which condition the wrapped module should be executed. It can also be shadowed by a condition function given to the constructor of this module. Returns: bool: The indication if the wrapped module should be executed. Always True in the base implementation
Reimplemented in IfStoreArrayNotPresentModule, and IfStoreArrayPresentModule.
Definition at line 199 of file metamodules.py.
|
inherited |
End run method of the module
Definition at line 102 of file metamodules.py.
event | ( | self | ) |
Event method of the module Evaluates the condition and sets the return value of this module to trigger the execution of the wrapped module.
Reimplemented from WrapperModule.
Definition at line 212 of file metamodules.py.
|
inherited |
Forwards the name().
Definition at line 86 of file metamodules.py.
|
inherited |
Initialize method of the module
Reimplemented in IfStoreArrayPresentModule, and PyProfilingModule.
Definition at line 90 of file metamodules.py.
|
inherited |
Forwards the parameters
Definition at line 73 of file metamodules.py.
|
inherited |
Terminate method of the module
Reimplemented in PyProfilingModule.
Definition at line 106 of file metamodules.py.
|
inherited |
Name of the wrapper class.
Definition at line 68 of file metamodules.py.
condition = condition |
Condition function called at each event to determine if wrapped module should be executed.
Reimplemented in IfStoreArrayNotPresentModule, and IfStoreArrayPresentModule.
Definition at line 197 of file metamodules.py.
|
inherited |
The wrapped module.
Definition at line 53 of file metamodules.py.