Public Member Functions | |
def | __init__ |
def | addCommand |
def | clearReturnValue |
def | clearReturnValues |
def | returnValue |
def | run |
def | start |
Static Public Attributes | |
NO_THREADS_FLAG = False | |
Private Attributes | |
_commandCounter | |
_commandTuples | |
_returnValues | |
Holds a list of commands that shall be executed in one Thread in a chain. The chain can run in two modes: Eighter it receives a command with optional attributes on construction. The return value can be accessed by calling returnValue() without arguments. In the second mode the constructor does not receive any arguments and commands are passed to the chain with addComand(). This function returns an id unique for the command making the return value of the command available through retrunValue(id). Start the ThreadChain using start(). One can check if the thread is still running using isRunning(). When all commands are executed a signal "finishedThreadChain" will be emitted.
Definition at line 5 of file ThreadChain.py.
def Vispa.Share.ThreadChain.ThreadChain.__init__ | ( | self, | |
command = None , |
|||
attr | |||
) |
Definition at line 17 of file ThreadChain.py.
def Vispa.Share.ThreadChain.ThreadChain.addCommand | ( | self, | |
command, | |||
attr | |||
) |
Adds a command to this ThreadChain and returns an id which is required to obtain the return value of this command. *attr is a optional tuple of arguments which will be passed to the command on execution.
Definition at line 26 of file ThreadChain.py.
References Vispa.Share.ThreadChain.ThreadChain._commandCounter, Vispa.Share.ThreadChain.ThreadChain._commandTuples, Vispa.Share.ThreadChain.ThreadChain._returnValues, edm::ELlog4cplus.emit(), and Vispa.Share.ThreadChain.ThreadChain.NO_THREADS_FLAG.
def Vispa.Share.ThreadChain.ThreadChain.clearReturnValue | ( | self, | |
command | |||
) |
Definition at line 44 of file ThreadChain.py.
def Vispa.Share.ThreadChain.ThreadChain.clearReturnValues | ( | self | ) |
Definition at line 41 of file ThreadChain.py.
def Vispa.Share.ThreadChain.ThreadChain.returnValue | ( | self, | |
id = None |
|||
) |
Returns return value of command with given id. The id is returned by addCommand(). If id is None the return value of the last command will be returned.
Definition at line 50 of file ThreadChain.py.
References Vispa.Share.ThreadChain.ThreadChain._returnValues.
def Vispa.Share.ThreadChain.ThreadChain.run | ( | self | ) |
Definition at line 70 of file ThreadChain.py.
References Vispa.Share.ThreadChain.ThreadChain._commandTuples, Vispa.Share.ThreadChain.ThreadChain._returnValues, edm::ELlog4cplus.emit(), and Vispa.Share.ThreadChain.ThreadChain.NO_THREADS_FLAG.
Referenced by Types.LuminosityBlockID.cppID().
def Vispa.Share.ThreadChain.ThreadChain.start | ( | self | ) |
Definition at line 64 of file ThreadChain.py.
References CSGContinuousAction.isRunning(), and Vispa.Share.ThreadChain.ThreadChain.NO_THREADS_FLAG.
Referenced by progressbar.ProgressBar.__next__(), Types.LuminosityBlockRange.cppID(), and Types.EventRange.cppID().
|
private |
Definition at line 20 of file ThreadChain.py.
Referenced by Vispa.Share.ThreadChain.ThreadChain.addCommand().
|
private |
Definition at line 19 of file ThreadChain.py.
Referenced by Vispa.Share.ThreadChain.ThreadChain.addCommand(), and Vispa.Share.ThreadChain.ThreadChain.run().
|
private |
Definition at line 21 of file ThreadChain.py.
Referenced by Vispa.Share.ThreadChain.ThreadChain.addCommand(), Vispa.Share.ThreadChain.ThreadChain.returnValue(), and Vispa.Share.ThreadChain.ThreadChain.run().
|
static |
Definition at line 16 of file ThreadChain.py.
Referenced by Vispa.Share.ThreadChain.ThreadChain.addCommand(), Vispa.Share.ThreadChain.ThreadChain.run(), and Vispa.Share.ThreadChain.ThreadChain.start().