Writing histograms to disk shouldn't impact analyzing data. This process should happen independently to prevent the analysis from lagging behind during online scanning.
Current Behavior
Writing histograms to disk halts the analysis of data. This leads to data loss during online acquisition. We're unable to scan data in a "live" format since the time between writes is so long.
Context
@jjvz mentioned this issue while scanning an online background spectrum. The file flushed every 1 M events, which took more than 15 minutes to accumulate. During a low rate experiment this would be an unacceptable delay.
Possible Solution (optional)
Flush the histograms in their own thread.
Acceptance Criteria
[x] Spawn Flush in its own thread so that analysis isn't impacted
Expected Behavior
Writing histograms to disk shouldn't impact analyzing data. This process should happen independently to prevent the analysis from lagging behind during online scanning.
Current Behavior
Writing histograms to disk halts the analysis of data. This leads to data loss during online acquisition. We're unable to scan data in a "live" format since the time between writes is so long.
Context
@jjvz mentioned this issue while scanning an online background spectrum. The file flushed every 1 M events, which took more than 15 minutes to accumulate. During a low rate experiment this would be an unacceptable delay.
Possible Solution (optional)
Flush the histograms in their own thread.
Acceptance Criteria