libtcspc.BucketEvent¶
- class libtcspc.BucketEvent(element_type)[source]¶
Bases:
EventTypeEvent carrying a contiguous array of elements of another event type.
Emitted by sources and batching processors (for example,
ReadBinaryStream,Batch, andAcquire) to transport bulk data through the graph with zero-copy semantics where possible.- Parameters:
element_type (EventType) – The event type of the elements stored in the bucket.
Notes
The corresponding C++ event is
tcspc::bucket<T>, a movable handle to a contiguous storage region. Moving a bucket transfers ownership of the storage; copying allocates and copies the data.This (writable) event type cannot be used to feed bulk data into a graph from Python, because sole ownership of a Python buffer cannot be guaranteed. Use the read-only
ConstBucketEventas a graph input instead.See also
- tcspc::bucket
The underlying C++ bucket type.
ConstBucketEventThe read-only counterpart (
tcspc::bucket<T const>); use this to push data into a graph from Python.