DUNE-DAQ
DUNE Trigger and Data Acquisition software
|
Naive signal processor: Calculates the running sum of the signal. More...
#include <NaiveRunSumProcessor.hpp>
Public Member Functions | |
naive_array_t | process (const naive_array_t &signal) override |
Calculate and store the running sum. | |
void | configure (const nlohmann::json &config, const int16_t *plane_numbers) override |
Configures the R factor and S factor according to plane. | |
![]() | |
![]() | |
virtual | ~AbstractProcessor ()=default |
void | set_next_processor (std::shared_ptr< AbstractProcessor< std::array< int16_t, 16 > > > next_processor) |
Setter for next processor. | |
Private Attributes | |
naive_array_t | m_memory_factor |
The R factor in the model equation. | |
naive_array_t | m_scale_factor |
The S factor in the model equation. | |
naive_array_t | m_running_sum |
The RS in the model equation. | |
Additional Inherited Members | |
![]() | |
using | naive_array_t = std::array<int16_t, 16> |
The naive version uses a standard array instead of __m256i. | |
![]() | |
using | signal_type_t |
Signal type to process on. General __m256i. | |
Naive signal processor: Calculates the running sum of the signal.
Calculates the running sum of the signal with some factors. This tries to model the following equation: RS = R * RS + S * signal
, where
RS
is the on-going running sum,R
is the memory factor of the on-going running sum,S
is the scale factor for the incoming signal to avoid overflowing,signal
is the incoming signal. Division is intentionally unorthodox to match what is possible in AVX. Definition at line 29 of file NaiveRunSumProcessor.hpp.
|
overridevirtual |
Configures the R
factor and S
factor according to plane.
config | JSON of the R and S factors to use per plane. |
plane_numbers | Array of plane numbers. Gives the channels to apply the R and S factors. |
Implements tpglibs::AbstractProcessor< std::array< int16_t, 16 > >.
Definition at line 15 of file NaiveRunSumProcessor.cpp.
|
overridevirtual |
Calculate and store the running sum.
signal | The input signal to process on. |
Reimplemented from tpglibs::NaiveProcessor.
Definition at line 29 of file NaiveRunSumProcessor.cpp.
|
private |
The R
factor in the model equation.
Definition at line 31 of file NaiveRunSumProcessor.hpp.
|
private |
The RS
in the model equation.
Definition at line 37 of file NaiveRunSumProcessor.hpp.
|
private |
The S
factor in the model equation.
Definition at line 34 of file NaiveRunSumProcessor.hpp.