Fix/mt cluster finder dropping frames (#265)
All checks were successful
Build on RHEL8 / build (push) Successful in 3m9s
Build on RHEL9 / build (push) Successful in 3m36s

Issue from Jonathan. 

- writing to output queue did not check if queue is full - such that
frames were dropped.

## Dataset to recreata issue: 

data overf 10G interface can be accessed on pc: pc-highz-02
raw frames:
/mnt/sls_det_storage_10G/highZ_data/JMulvey/Calibration_From_HZ02/2025Jan_m343/Zr15800eV/250129_CZTsolo_Xray_Tp_15C_tint_100_master_0.json

pedestal frames:
/mnt/sls_det_storage_10G/highZ_data/JMulvey/Calibration_From_HZ02/2025Jan_m343/Zr15800eV/250129_CZTsolo_Pedestal_Tp_15C_tint_100_master_0.json

---------

Co-authored-by: Erik Fröjdh <erik.frojdh@psi.ch>
This commit is contained in:
2026-01-20 17:02:27 +01:00
committed by GitHub
parent 31f3a60cd3
commit cbefbc43e9
2 changed files with 9 additions and 2 deletions

View File

@@ -13,6 +13,10 @@
- Removed Print/Print_some/Print_all form NDArray (operator << still works)
- Added const* version of .data()
### Bugfixes:
- multi threaded cluster finder doesnt drop frames if queues are full
### 2025.11.21

View File

@@ -73,8 +73,11 @@ class ClusterFinderMT {
switch (frame->type) {
case FrameType::DATA:
cf->find_clusters(frame->data.view(), frame->frame_number);
m_output_queues[thread_id]->write(
cf->steal_clusters(realloc_same_capacity));
while (!m_output_queues[thread_id]->write(
cf->steal_clusters(realloc_same_capacity))) {
std::this_thread::sleep_for(m_default_wait);
}
break;
case FrameType::PEDESTAL: