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 event type declared on the graph’s output edge must be one that is explicitly supported for delivery to Python; graphs whose output carries an unsupported event type are rejected when the graph is compiled. Bare bucket events (
BucketEvent,ConstBucketEvent) are delivered as NumPy arrays; events with fields, including bucket-carrying events such asHistogramEvent, are delivered asEventInstancevalues whose bucket fields read as read-only NumPy arrays.- Return type:
None
Notes
Called once per event delivered to this sink. Exceptions raised propagate out of the surrounding
ExecutionContext.handlecall.