Frames raw ALCOR data streams from multiple input files in parallel.
More...
#include <parallel_streaming_framer.h>
Frames raw ALCOR data streams from multiple input files in parallel.
This class manages multiple alcor_data_streamer instances, one per input file, and processes them concurrently to produce framed spill data. It supports optional trigger and readout configuration and afterpulse suppression.
- Note
- Frame size and timing constants are defined via macros and should eventually be moved to a config file with a proper pass-down mechanism to alcor_spilldata.
◆ parallel_streaming_framer() [1/3]
| parallel_streaming_framer::parallel_streaming_framer |
( |
std::vector< std::string > |
filenames, |
|
|
uint16_t |
frame_size = _FRAME_SIZE_ |
|
) |
| |
|
inline |
Construct a framer from a list of input files.
- Parameters
-
| filenames | Paths to the raw ALCOR data files to stream. |
| frame_size | Number of clock cycles per frame (default: _FRAME_SIZE_). |
◆ parallel_streaming_framer() [2/3]
| parallel_streaming_framer::parallel_streaming_framer |
( |
std::vector< std::string > |
filenames, |
|
|
std::string |
trigger_config_file, |
|
|
uint16_t |
frame_size = _FRAME_SIZE_ |
|
) |
| |
|
inline |
Construct a framer with trigger configuration.
- Parameters
-
| filenames | Paths to the raw ALCOR data files to stream. |
| trigger_config_file | Path to the trigger configuration file. |
| frame_size | Number of clock cycles per frame (default: _FRAME_SIZE_). |
◆ parallel_streaming_framer() [3/3]
| parallel_streaming_framer::parallel_streaming_framer |
( |
std::vector< std::string > |
filenames, |
|
|
std::string |
trigger_config_file, |
|
|
std::string |
readout_config_file, |
|
|
uint16_t |
frame_size = _FRAME_SIZE_ |
|
) |
| |
Construct a framer with trigger and readout configuration.
- Parameters
-
| filenames | Paths to the raw ALCOR data files to stream. |
| trigger_config_file | Path to the trigger configuration file. |
| readout_config_file | Path to the readout configuration file. |
| frame_size | Number of clock cycles per frame (default: _FRAME_SIZE_). |
◆ assign_bar() [1/2]
| void parallel_streaming_framer::assign_bar |
( |
mist::logger::progress_bar & |
bar | ) |
|
Assign a standalone progress bar for reporting streaming progress.
The framer holds a non-owning pointer — bar must remain alive for the entire duration of processing. Replaces any previously assigned bar.
- Parameters
-
| bar | A progress_bar instance owned by the caller. |
◆ assign_bar() [2/2]
| void parallel_streaming_framer::assign_bar |
( |
mist::logger::subtask_progress_bar & |
bar | ) |
|
Assign a subtask bar from a multi_progress_bar group.
Use this when the framer is one of several concurrent tasks displayed together. The parent multi_progress_bar (and therefore this subtask handle) must outlive the framer. Replaces any previously assigned bar.
- Parameters
-
| bar | A subtask_progress_bar handle returned by multi_progress_bar::add_subtask(). |
◆ clear_bar()
| void parallel_streaming_framer::clear_bar |
( |
| ) |
|
Detach the currently assigned bar without finishing it.
After this call the framer reports no progress. The bar itself is unaffected — the caller retains full ownership.
◆ get_fine_tune_distribution()
| TH2F * parallel_streaming_framer::get_fine_tune_distribution |
( |
| ) |
|
Returns the fine tune distribution per tdc index.
- Returns
- fine tune distribution per tdc index.
◆ get_registered_triggers()
| int parallel_streaming_framer::get_registered_triggers |
( |
| ) |
|
Returns the number of triggers registered from the configuration file.
- Returns
- Number of triggers registered from the configuration file.
- Todo:
- Trigger number should be assigned by program, and checked to avoid using reserved numbers > should be [0-100[
◆ get_spilldata()
Returns a copy of the current spill data.
- Returns
- The accumulated alcor_spilldata for the current spill.
◆ get_spilldata_link()
Returns a reference to the current spill data.
- Returns
- Reference to the internal alcor_spilldata object.
◆ next_spill()
| bool parallel_streaming_framer::next_spill |
( |
| ) |
|
Advances all data streams to the next spill.
- Returns
true if a next spill is available, false if all streams are exhausted.
◆ process()
| void parallel_streaming_framer::process |
( |
alcor_data_streamer & |
current_stream, |
|
|
int |
_frame_size |
|
) |
| |
Processes a single data stream and returns the framed spill data.
- Parameters
-
| current_stream | Reference to the alcor_data_streamer to process. |
| _frame_size | Number of clock cycles per frame. |
◆ set_parallel_cores()
| void parallel_streaming_framer::set_parallel_cores |
( |
uint16_t |
v | ) |
|
Sets the number of parallel processing threads.
- Parameters
-
| v | Requested number of threads. |
◆ set_spilldata()
Sets the spill data by value.
- Parameters
-
◆ set_spilldata_link()
Sets the spill data by reference.
- Parameters
-
The documentation for this class was generated from the following files:
- /home/runner/work/epic-drich-beam-test-analysis/epic-drich-beam-test-analysis/include/parallel_streaming_framer.h
- /home/runner/work/epic-drich-beam-test-analysis/epic-drich-beam-test-analysis/src/parallel_streaming_framer.cxx