libtcspc.PySink¶
- class libtcspc.PySink[source]¶
Bases:
ABCAbstract base class for sinks (output handling processors) written in Python.
- abstractmethod flush()[source]¶
Signal end of input to this sink.
Notes
Called once after the graph’s downstream output is flushed. Exceptions raised propagate out of the surrounding
ExecutionContext.flushcall.- Return type:
None
- abstractmethod handle(event)[source]¶
Process one event emitted to this sink from the graph.
- Parameters:
event (Any) – The event object. The Python type depends on the event type declared on the corresponding graph output: a wrapped event for most types, or a NumPy array for
BucketEvent.- Return type:
None
Notes
Called once per event delivered to this sink. Exceptions raised propagate out of the surrounding
ExecutionContext.handlecall.