DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
AVXFrugalPedestalSubtractProcessor.hpp
Go to the documentation of this file.
1
10#include <memory>
11
12#ifndef TPGLIBS_AVXFRUGALPEDESTALSUBTRACTPROCESSOR_HPP_
13#define TPGLIBS_AVXFRUGALPEDESTALSUBTRACTPROCESSOR_HPP_
14
15namespace tpglibs {
16
24 protected:
26 __m256i m_pedestal = _mm256_set1_epi16(0x4000); // Set initial start to 14-bit max. Prevents garbage TPs at start.
27
29 __m256i m_accum = _mm256_setzero_si256();
30
32 int16_t m_accum_limit{10};
33
34 public:
37
43 __m256i process(const __m256i& signal) override;
44
50 void configure(const nlohmann::json& config, const int16_t* plane_numbers) override;
51};
52
53} // namespace tpglibs
54
55#endif // TPGLIBS_AVXFRUGALPEDESTALSUBTRACTPROCESSOR_HPP_
AVX signal processor: Estimates the pedestal and subtracts.
void configure(const nlohmann::json &config, const int16_t *plane_numbers) override
Configure the accumulation limit according to plane number.
~AVXFrugalPedestalSubtractProcessor() noexcept=default
__m256i process(const __m256i &signal) override
Estimate the pedestal using the given signal and subtract.
__m256i m_pedestal
Vector of estimated pedestals for each channel.
int16_t m_accum_limit
Count limit before committing to a pedestal shift.
__m256i m_accum
Vector of counts that a channel's signal was above or below m_pedestal.
AVX typed abstract signal processor.