DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
AVXFrugalPedestalSubtractProcessor.hpp
Go to the documentation of this file.
1
8
10#include <memory>
11
12#ifndef TPGLIBS_AVXFRUGALPEDESTALSUBTRACTPROCESSOR_HPP_
13#define TPGLIBS_AVXFRUGALPEDESTALSUBTRACTPROCESSOR_HPP_
14
15namespace tpglibs {
16
24{
25protected:
27 __m256i m_pedestal = _mm256_set1_epi16(0x4000); // Set initial start to 14-bit max. Prevents garbage TPs at start.
28
30 __m256i m_accum = _mm256_setzero_si256();
31
33 int16_t m_accum_limit{ 10 };
34
35public:
38
44 __m256i process(const __m256i& signal) override;
45
51 void configure(const nlohmann::json& config, const int16_t* plane_numbers) override;
52};
53
54} // namespace tpglibs
55
56#endif // TPGLIBS_AVXFRUGALPEDESTALSUBTRACTPROCESSOR_HPP_
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.