DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
tpglibs::AbstractProcessor< T > Class Template Referenceabstract

Abstract signal processor. More...

#include <AbstractProcessor.hpp>

Public Types

using signal_type_t = T
 Signal type to process on. General __m256i.

Public Member Functions

virtual ~AbstractProcessor ()=default
virtual void configure_internal_state_collection (const nlohmann::json &)
 No-op: state monitoring disabled at build time.
virtual void configure (const nlohmann::json &config, const int16_t *plane_numbers)=0
 Pure virtual function that will configure the processor using plane numbers.
void set_next_processor (std::shared_ptr< AbstractProcessor< T > > next_processor)
 Setter for next processor.
std::shared_ptr< AbstractProcessor< T > > get_next_processor ()
 Getter for next processor.
virtual T process (const T &signal)
 Simple signal pass-through.
virtual std::vector< std::string > get_requested_internal_state_names () const
 Get the names of requested internal states (delegates to registry).
virtual ProcessorMetricArray< std::array< int16_t, 16 > > read_internal_states_as_integer_array ()

Private Attributes

std::shared_ptr< AbstractProcessor< T > > m_next_processor
 Points to next processor in the chain.

Detailed Description

template<class T>
class tpglibs::AbstractProcessor< T >

Abstract signal processor.

Configurable signal processor for TPG.

Definition at line 29 of file AbstractProcessor.hpp.

Member Typedef Documentation

◆ signal_type_t

template<class T>
using tpglibs::AbstractProcessor< T >::signal_type_t = T

Signal type to process on. General __m256i.

Definition at line 47 of file AbstractProcessor.hpp.

Constructor & Destructor Documentation

◆ ~AbstractProcessor()

template<class T>
virtual tpglibs::AbstractProcessor< T >::~AbstractProcessor ( )
virtualdefault

Member Function Documentation

◆ configure()

template<class T>
virtual void tpglibs::AbstractProcessor< T >::configure ( const nlohmann::json & config,
const int16_t * plane_numbers )
pure virtual

◆ configure_internal_state_collection()

template<class T>
virtual void tpglibs::AbstractProcessor< T >::configure_internal_state_collection ( const nlohmann::json & )
inlinevirtual

No-op: state monitoring disabled at build time.

Definition at line 89 of file AbstractProcessor.hpp.

89{}

◆ get_next_processor()

template<class T>
std::shared_ptr< AbstractProcessor< T > > tpglibs::AbstractProcessor< T >::get_next_processor ( )
inline

Getter for next processor.

Definition at line 99 of file AbstractProcessor.hpp.

99{ return m_next_processor; }
std::shared_ptr< AbstractProcessor< T > > m_next_processor
Points to next processor in the chain.

◆ get_requested_internal_state_names()

template<class T>
virtual std::vector< std::string > tpglibs::AbstractProcessor< T >::get_requested_internal_state_names ( ) const
inlinevirtual

Get the names of requested internal states (delegates to registry).

Definition at line 111 of file AbstractProcessor.hpp.

112 {
113#ifdef TPGLIBS_ENABLE_STATE_MONITORING
114 return m_internal_state_name_registry.get_names_of_requested_internal_states();
115#else
116 return {};
117#endif
118 }
Abstract signal processor.

◆ process()

◆ read_internal_states_as_integer_array()

template<class T>
virtual ProcessorMetricArray< std::array< int16_t, 16 > > tpglibs::AbstractProcessor< T >::read_internal_states_as_integer_array ( )
inlinevirtual

Definition at line 120 of file AbstractProcessor.hpp.

121 {
122#ifdef TPGLIBS_ENABLE_STATE_MONITORING
123 return m_internal_state_buffer_manager.switch_buffer_and_read_casted();
124#else
125 return { nullptr, 0 };
126#endif
127 }

◆ set_next_processor()

template<class T>
void tpglibs::AbstractProcessor< T >::set_next_processor ( std::shared_ptr< AbstractProcessor< T > > next_processor)
inline

Setter for next processor.

Definition at line 96 of file AbstractProcessor.hpp.

Member Data Documentation

◆ m_next_processor

template<class T>
std::shared_ptr<AbstractProcessor<T> > tpglibs::AbstractProcessor< T >::m_next_processor
private

Points to next processor in the chain.

Definition at line 32 of file AbstractProcessor.hpp.


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