HitMerger¶
- class waveline.utils.HitMerger(max_queue_size=None)[source]¶
Merge AE and TR records into HitRecords based on the transient recorder index (trai).
Since AE and TR records arrive in order for each channel, AE records are stored in channel-specific queues and merged with corresponding TR records as they become available.
- __init__(max_queue_size=None)[source]¶
Initialize the HitMerger with an optional maximum queue size.
Methods
__init__([max_queue_size])Initialize the HitMerger with an optional maximum queue size.
clear()Clear all buffered AE records.
process(record)Process a single AE or TR record.
- process(record)[source]¶
Process a single AE or TR record.
- Return type:
- Returns:
HitRecord if a merge occurred, otherwise None.
- Raises:
QueueFullError – If the queue for a channel is full when processing an AERecord.