libtcspc.CopyToBuckets¶
- final class libtcspc.CopyToBuckets(element_type, buffer_provider=None)[source]¶
Bases:
NodeProcessor that copies pushed data into buckets.
Used to plug a push-style data source — such as a hardware acquisition driver that hands the application blocks of data — into a libtcspc processing graph. The contents of each incoming data event are copied into a bucket obtained from the buffer provider, which is then emitted as a
BucketEventdownstream. This is the push-mode counterpart ofAcquire.Data is typically fed in by pushing numpy arrays (or other buffer-protocol objects) into the graph input; each is wrapped zero-copy as a read-only bucket, so the only bulk-data copy is the one into the bucket-source’s buckets.
- Parameters:
element_type (EventType) – Element type
Tof the data. Each emitted bucket holds a contiguous array of this type.buffer_provider (BucketSource or Param[PyBucketSource] or None) – Source of buckets used to hold each copy. If
None, a defaultRecyclingBucketSourceforelement_typeis used. A runtimeParamof typePyBucketSourcebinds a Python bucket source at execution time.
Notes
Events handled:
A
ConstBucketEventofelement_type(a read-onlybucket<T const>): copied into a bucket and emitted as aBucketEventofelement_type(variable size, one per incoming data event).All other event types: passed through unchanged, to carry out-of-band timing events.
End of input: pass through.
See also
- tcspc::copy_to_buckets()
The underlying C++ factory function.
CopyToFullBucketsThe two-output counterpart that also delivers real-time views.
AcquireThe pull-mode counterpart.
BucketSourceInterface for bucket sources.
PyBucketSourceInterface for Python bucket sources (used via
Param).