DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
tpglibs::AVXFixedPedestalSubtractProcessor Class Reference

AVX signal processor: Fixes the estimated pedestal after a configured amount of time. More...

#include <AVXFixedPedestalSubtractProcessor.hpp>

Inheritance diagram for tpglibs::AVXFixedPedestalSubtractProcessor:
[legend]
Collaboration diagram for tpglibs::AVXFixedPedestalSubtractProcessor:
[legend]

Public Member Functions

__m256i process (const __m256i &signal) override
 Estimates the pedestal for some time and subtracts.
 
void configure (const nlohmann::json &config, const int16_t *plane_numbers) override
 Configure the number of startup samples to use before fixing.
 
- Public Member Functions inherited from tpglibs::AVXFrugalPedestalSubtractProcessor
 AVXFrugalPedestalSubtractProcessor ()
 Allocate and initialize dual buffers.
 
 ~AVXFrugalPedestalSubtractProcessor () noexcept
 Release buffer memory.
 
__m256i process (const __m256i &signal) override
 Estimate the pedestal using the given signal and subtract.
 
void configure (const nlohmann::json &config, const int16_t *plane_numbers) override
 Configure the accumulation limit according to plane number.
 
void save_metric_to_store_buffer () override
 Save metrics to store buffer.
 
virtual std::vector< std::string > get_metric_items () override
 returns the metrics being recorded and can be read by this processor
 
ProcessorMetricArray< __m256i > read_from_metric_store_buffer () override
 Read metrics from store buffer.
 
- Public Member Functions inherited from tpglibs::AVXProcessor
void save_metric_to_store_buffer () override
 Save metrics to store buffer; no-op for basic AVXProcessor.
 
ProcessorMetricArray< __m256i > read_from_metric_store_buffer () override
 Read metrics from store buffer; returns empty for basic AVXProcessor.
 
- Public Member Functions inherited from tpglibs::AbstractProcessor< __m256i >
virtual ~AbstractProcessor ()=default
 
void set_next_processor (std::shared_ptr< AbstractProcessor< __m256i > > next_processor)
 Setter for next processor.
 
virtual void attach_to_metric_collector (ProcessorMetricCollector< signal_type_t > &collector, size_t pipeline_id)
 Register this processor and next processor with the metric collector.
 

Protected Attributes

uint16_t m_start_period {1000}
 Configured number of samples to use before fixing.
 
uint16_t m_num_time_steps {0}
 Counted number of samples.
 
- Protected Attributes inherited from tpglibs::AVXFrugalPedestalSubtractProcessor
__m256i m_pedestal = _mm256_set1_epi16(0x4000)
 Vector of estimated pedestals for each channel.
 
__m256i m_accum = _mm256_setzero_si256()
 Vector of counts that a channel's signal was above or below m_pedestal.
 
int16_t m_accum_limit {10}
 Count limit before committing to a pedestal shift.
 
uint64_t m_sample_period {512}
 Adjustable period for storing metric to buffer, in terms of number of time process happens (sampling period)
 
uint64_t m_samples {0}
 
bool m_collect_metric_flag {false}
 

Additional Inherited Members

- Public Types inherited from tpglibs::AbstractProcessor< __m256i >
using signal_type_t
 Signal type to process on. General __m256i.
 

Detailed Description

AVX signal processor: Fixes the estimated pedestal after a configured amount of time.

Look to AVXFrugalPedestalSubtractProcessor for details on how the pedestal is estimated.

Definition at line 21 of file AVXFixedPedestalSubtractProcessor.hpp.

Member Function Documentation

◆ configure()

void tpglibs::AVXFixedPedestalSubtractProcessor::configure ( const nlohmann::json & config,
const int16_t * plane_numbers )
overridevirtual

Configure the number of startup samples to use before fixing.

Parameters
configJSON config for start period per plane.
plane_numbersArray of plane numbers. Gives the channels to apply the start period.

Implements tpglibs::AbstractProcessor< __m256i >.

Definition at line 15 of file AVXFixedPedestalSubtractProcessor.cpp.

15 {
17 m_start_period = config["start_period"];
18}
uint16_t m_start_period
Configured number of samples to use before fixing.
void configure(const nlohmann::json &config, const int16_t *plane_numbers) override
Configure the accumulation limit according to plane number.

◆ process()

__m256i tpglibs::AVXFixedPedestalSubtractProcessor::process ( const __m256i & signal)
overridevirtual

Estimates the pedestal for some time and subtracts.

Reimplemented from tpglibs::AVXProcessor.

Definition at line 20 of file AVXFixedPedestalSubtractProcessor.cpp.

20 {
24 }
25 return AVXProcessor::process(_mm256_sub_epi16(signal, m_pedestal));
26}
__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.
virtual __m256i process(const __m256i &signal) override
Simple signal pass-through on __m256i type.

Member Data Documentation

◆ m_num_time_steps

uint16_t tpglibs::AVXFixedPedestalSubtractProcessor::m_num_time_steps {0}
protected

Counted number of samples.

Definition at line 27 of file AVXFixedPedestalSubtractProcessor.hpp.

27{0};

◆ m_start_period

uint16_t tpglibs::AVXFixedPedestalSubtractProcessor::m_start_period {1000}
protected

Configured number of samples to use before fixing.

Definition at line 24 of file AVXFixedPedestalSubtractProcessor.hpp.

24{1000};

The documentation for this class was generated from the following files: