libtcspc.ConstBucketEvent¶
- class libtcspc.ConstBucketEvent(element_type)[source]¶
Bases:
EventTypeEvent carrying a read-only contiguous array of elements of another event type.
Emitted by sources that deliver real-time, read-only views of partial buckets — for example, the
liveoutput ofAcquireFullBuckets. The view co-owns its backing storage and must not be modified.- Parameters:
element_type (EventType) – The event type of the elements stored in the bucket.
Notes
The corresponding C++ event is
tcspc::bucket<T const>, a movable handle to a contiguous storage region that is read-only and may be shared with its owner. This is a distinct type fromBucketEvent(tcspc::bucket<T>).This is the event type to use when feeding bulk data into a graph from Python (for example, as the input to
CopyToBucketsorCopyToFullBuckets): a numpy array or other buffer-protocol object pushed into a graph input declared asConstBucketEventis wrapped zero-copy as a read-only bucket. Pushing data in as aBucketEvent(writable) is not supported, because sole ownership of a Python buffer cannot be guaranteed.See also
- tcspc::bucket
The underlying C++ bucket type.
BucketEventThe writable counterpart (
tcspc::bucket<T>).