Skip to content

The RawDataContainer that marks the end of a scan iteration for the Histogrammer

Alex Toldaiev requested to merge (removed):devel_LoopEndInHistogrammer into devel

StdDataLoop sends an empty RawDataContainer with LoopStatus LoopStyle LOOP_STYLE_END, that marks the end of the scan iteration in the stream of RX data. The histogrammer publishes its histograms only when it sees the end of iteration marker. All other processing threads can also sync with this marker, if they need so.

Motivation: such a marker is needed when the threads want to synchronize with the iterations of the main scan thread of LoopActions. Right now, this synchronization happens implicitly, as a scan iteration sends only 1 RawDataContainer for processing.

The data processing feedback mechanism has to push data for processing continuously during a scan iteration. Therefore it needs this marker to finish the iteration.

The Histogrammer processes all event data, with any LoopStatus. LoopStatus Style END only triggers the publishing.

The Histogrammer also calls create on the algorithms only when it is processing a new iteration, which is defined by bool is_new_iteration. On publish it resets the bool to true.

Updated the tests to include this. Added a test specifically for the operation of LoopStatus END in the Histogrammer: test_histogrammer.cpp.

modified:   src/libYarr/HistogramAlgorithm.cpp
modified:   src/libYarr/include/HistogramAlgorithm.h
modified:   src/libYarr/include/LoopStatus.h
modified:   src/libYarr/tests/CMakeLists.txt
new file:   src/libYarr/tests/test_histogrammer.cpp
modified:   src/libYarr/tests/test_hits_per_event.cpp
modified:   src/libYarr/tests/test_l13d.cpp
modified:   src/libYarr/tests/test_l1dist.cpp
modified:   src/libYarr/tests/test_occupancy.cpp
modified:   src/libYarr/tests/test_tot3d.cpp
modified:   src/libYarr/tests/test_tot_dist.cpp
Edited by Alex Toldaiev

Merge request reports