DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dunedaq::appmodel::DataHandlerConf Class Reference

#include <DataHandlerConf.hpp>

Inheritance diagram for dunedaq::appmodel::DataHandlerConf:
[legend]
Collaboration diagram for dunedaq::appmodel::DataHandlerConf:
[legend]

Public Member Functions

virtual void print (unsigned int offset, bool print_header, std::ostream &s) const
 Print details of the DataHandlerConf object.
 
virtual std::vector< const dunedaq::conffwk::DalObject * > get (const std::string &name, bool upcast_unregistered=true) const
 Get values of relationships and results of some algorithms as a vector of dunedaq::conffwk::DalObject pointers.
 
const std::string & get_template_for () const
 Get "template_for" attribute value.
 
void set_template_for (const std::string &value)
 Set "template_for" attribute value.
 
const std::string & get_input_data_type () const
 Get "input_data_type" attribute value. Type of data received by this readout module.
 
void set_input_data_type (const std::string &value)
 Set "input_data_type" attribute value. Type of data received by this readout module.
 
bool get_generate_timesync () const
 Get "generate_timesync" attribute value.
 
void set_generate_timesync (bool value)
 Set "generate_timesync" attribute value.
 
uint64_t get_post_processing_delay_ticks () const
 Get "post_processing_delay_ticks" attribute value. Number of clock tick by which post processing of incoming data shall be delayed.
 
void set_post_processing_delay_ticks (uint64_t value)
 Set "post_processing_delay_ticks" attribute value. Number of clock tick by which post processing of incoming data shall be delayed.
 
const dunedaq::appmodel::RequestHandlerget_request_handler () const
 Get "request_handler" relationship value.
 
void set_request_handler (const dunedaq::appmodel::RequestHandler *value)
 Set "request_handler" relationship value.
 
const dunedaq::appmodel::LatencyBufferget_latency_buffer () const
 Get "latency_buffer" relationship value.
 
void set_latency_buffer (const dunedaq::appmodel::LatencyBuffer *value)
 Set "latency_buffer" relationship value.
 
const dunedaq::appmodel::DataProcessorget_data_processor () const
 Get "data_processor" relationship value.
 
void set_data_processor (const dunedaq::appmodel::DataProcessor *value)
 Set "data_processor" relationship value.
 
virtual void print (unsigned int offset, bool print_header, std::ostream &s) const
 Print details of the DataHandlerConf object.
 
virtual std::vector< const dunedaq::conffwk::DalObject * > get (const std::string &name, bool upcast_unregistered=true) const
 Get values of relationships and results of some algorithms as a vector of dunedaq::conffwk::DalObject pointers.
 
const std::string & get_template_for () const
 Get "template_for" attribute value.
 
void set_template_for (const std::string &value)
 Set "template_for" attribute value.
 
const std::string & get_input_data_type () const
 Get "input_data_type" attribute value. Type of data received by this readout module.
 
void set_input_data_type (const std::string &value)
 Set "input_data_type" attribute value. Type of data received by this readout module.
 
bool get_generate_timesync () const
 Get "generate_timesync" attribute value.
 
void set_generate_timesync (bool value)
 Set "generate_timesync" attribute value.
 
uint64_t get_post_processing_delay_ticks () const
 Get "post_processing_delay_ticks" attribute value. Number of clock tick by which post processing of incoming data shall be delayed.
 
void set_post_processing_delay_ticks (uint64_t value)
 Set "post_processing_delay_ticks" attribute value. Number of clock tick by which post processing of incoming data shall be delayed.
 
const dunedaq::appmodel::RequestHandlerget_request_handler () const
 Get "request_handler" relationship value.
 
void set_request_handler (const dunedaq::appmodel::RequestHandler *value)
 Set "request_handler" relationship value.
 
const dunedaq::appmodel::LatencyBufferget_latency_buffer () const
 Get "latency_buffer" relationship value.
 
void set_latency_buffer (const dunedaq::appmodel::LatencyBuffer *value)
 Set "latency_buffer" relationship value.
 
const dunedaq::appmodel::DataProcessorget_data_processor () const
 Get "data_processor" relationship value.
 
void set_data_processor (const dunedaq::appmodel::DataProcessor *value)
 Set "data_processor" relationship value.
 
- Public Member Functions inherited from dunedaq::conffwk::DalObject
const std::string & UID () const noexcept
 
const std::string & class_name () const noexcept
 
bool castable (const std::string &target) const noexcept
 
bool castable (const std::string *target) const noexcept
 
template<class TARGET >
const TARGET * cast () const noexcept
 Casts object to different class.
 
std::string full_name () const noexcept
 
const ConfigObjectconfig_object () const
 
DalRegistryregistry () const noexcept
 
Configurationconfiguration () const noexcept
 
void unread ()
 
void set (const ConfigObject &o) noexcept
 
void move (const std::string &at)
 
void rename (const std::string &new_id)
 
void p_hdr (std::ostream &s, unsigned int indent, const std::string &cl, const char *nm=nullptr) const
 print object headers
 
std::ostream & print_object (std::ostream &s) const
 print object details
 
void throw_init_ex (dunedaq::conffwk::Exception &ex)
 throw object initialisation exception (i.e.
 

Static Public Member Functions

static const std::string & __get_template_for_str () noexcept
 
static const std::string & __get_input_data_type_str () noexcept
 
static const std::string & __get_generate_timesync_str () noexcept
 
static const std::string & __get_post_processing_delay_ticks_str () noexcept
 
static const std::string & __get_request_handler_str () noexcept
 
static const std::string & __get_latency_buffer_str () noexcept
 
static const std::string & __get_data_processor_str () noexcept
 
static const std::string & __get_template_for_str () noexcept
 
static const std::string & __get_input_data_type_str () noexcept
 
static const std::string & __get_generate_timesync_str () noexcept
 
static const std::string & __get_post_processing_delay_ticks_str () noexcept
 
static const std::string & __get_request_handler_str () noexcept
 
static const std::string & __get_latency_buffer_str () noexcept
 
static const std::string & __get_data_processor_str () noexcept
 
- Static Public Member Functions inherited from dunedaq::conffwk::DalObject
static void p_null (std::ostream &s)
 print "(null)"
 
static void p_rm (std::ostream &s)
 print "(deleted object)"
 
static void p_error (std::ostream &s, dunedaq::conffwk::Exception &ex)
 print error text
 
static void throw_get_ex (const std::string &what, const std::string &class_name, const DalObject *obj)
 throw exception in generated get method (i.e.
 
static bool is_null (const DalObject *ref) noexcept
 check a pointer on DAL object is null
 

Static Public Attributes

static const std::string & s_class_name
 
static const std::string s_template_for = "template_for"
 
static const std::string s_input_data_type = "input_data_type"
 
static const std::string s_generate_timesync = "generate_timesync"
 
static const std::string s_post_processing_delay_ticks = "post_processing_delay_ticks"
 
static const std::string s_request_handler = "request_handler"
 
static const std::string s_latency_buffer = "latency_buffer"
 
static const std::string s_data_processor = "data_processor"
 

Protected Member Functions

 DataHandlerConf (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~DataHandlerConf () noexcept
 
virtual void init (bool init_children)
 
bool get (const std::string &name, std::vector< const dunedaq::conffwk::DalObject * > &vec, bool upcast_unregistered, bool first_call) const
 
 DataHandlerConf (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~DataHandlerConf () noexcept
 
virtual void init (bool init_children)
 
bool get (const std::string &name, std::vector< const dunedaq::conffwk::DalObject * > &vec, bool upcast_unregistered, bool first_call) const
 
- Protected Member Functions inherited from dunedaq::conffwk::DalObject
 DalObject (DalRegistry &db, const ConfigObject &o) noexcept
 
virtual ~DalObject ()
 
void clear () noexcept
 
void check () const
 
bool is_deleted () const
 
void increment_created () noexcept
 
void increment_read () noexcept
 
void check_init () const
 Check and initialize object if necessary.
 
template<typename T >
void _set_object (const std::string &name, const T *value)
 Helper method for generated set single-value relationship methods.
 
template<typename T >
void _set_objects (const std::string &name, const std::vector< const T * > &value)
 Helper method for generated set multi-value relationship methods.
 
bool get_rel_objects (const std::string &name, bool upcast_unregistered, std::vector< const DalObject * > &objs) const
 Read relationship values as DAL objects using DAL factory.
 
bool get_algo_objects (const std::string &name, std::vector< const DalObject * > &objs) const
 Run algorithm and return result as DAL objects using DAL factory.
 

Private Attributes

std::string m_template_for
 
std::string m_input_data_type
 
bool m_generate_timesync
 
uint64_t m_post_processing_delay_ticks
 
const dunedaq::appmodel::RequestHandlerm_request_handler
 
const dunedaq::appmodel::LatencyBufferm_latency_buffer
 
const dunedaq::appmodel::DataProcessorm_data_processor
 

Friends

class conffwk::Configuration
 
class conffwk::DalObject
 
class conffwk::DalFactory
 
class conffwk::DalRegistry
 

Additional Inherited Members

- Protected Attributes inherited from dunedaq::conffwk::DalObject
std::mutex m_mutex
 Used to protect changes of DAL object.
 
bool p_was_read
 is true, if the object was read
 
DalRegistryp_registry
 Configuration object.
 
ConfigObject p_obj
 Config object used by given template object.
 
std::string p_UID
 Is used for template objects (see dqm_conffwk)
 

Detailed Description

Definition at line 31 of file DataHandlerConf.hpp.

Constructor & Destructor Documentation

◆ DataHandlerConf() [1/2]

dunedaq::appmodel::DataHandlerConf::DataHandlerConf ( conffwk::DalRegistry & db,
const conffwk::ConfigObject & obj )
protectednoexcept

Definition at line 33 of file DataHandlerConf.cpp.

33 :
35 m_request_handler (nullptr),
36 m_latency_buffer (nullptr),
37 m_data_processor (nullptr)
38
39 {
40 ;
41 }
const dunedaq::appmodel::DataProcessor * m_data_processor
const dunedaq::appmodel::RequestHandler * m_request_handler
const dunedaq::appmodel::LatencyBuffer * m_latency_buffer
The base class for any generated DAL object.
Definition DalObject.hpp:45

◆ ~DataHandlerConf() [1/2]

dunedaq::appmodel::DataHandlerConf::~DataHandlerConf ( )
protectedvirtualnoexcept

Definition at line 95 of file DataHandlerConf.cpp.

96 {
97 }

◆ DataHandlerConf() [2/2]

dunedaq::appmodel::DataHandlerConf::DataHandlerConf ( conffwk::DalRegistry & db,
const conffwk::ConfigObject & obj )
protectednoexcept

◆ ~DataHandlerConf() [2/2]

virtual dunedaq::appmodel::DataHandlerConf::~DataHandlerConf ( )
protectedvirtualnoexcept

Member Function Documentation

◆ __get_data_processor_str() [1/2]

static const std::string & dunedaq::appmodel::DataHandlerConf::__get_data_processor_str ( )
inlinestaticnoexcept

Definition at line 242 of file DataHandlerConf.hpp.

242{ return s_data_processor; }
static const std::string s_data_processor

◆ __get_data_processor_str() [2/2]

static const std::string & dunedaq::appmodel::DataHandlerConf::__get_data_processor_str ( )
inlinestaticnoexcept

Definition at line 242 of file DataHandlerConf.hpp.

242{ return s_data_processor; }

◆ __get_generate_timesync_str() [1/2]

static const std::string & dunedaq::appmodel::DataHandlerConf::__get_generate_timesync_str ( )
inlinestaticnoexcept

Definition at line 102 of file DataHandlerConf.hpp.

102{ return s_generate_timesync; }
static const std::string s_generate_timesync

◆ __get_generate_timesync_str() [2/2]

static const std::string & dunedaq::appmodel::DataHandlerConf::__get_generate_timesync_str ( )
inlinestaticnoexcept

Definition at line 102 of file DataHandlerConf.hpp.

102{ return s_generate_timesync; }

◆ __get_input_data_type_str() [1/2]

static const std::string & dunedaq::appmodel::DataHandlerConf::__get_input_data_type_str ( )
inlinestaticnoexcept

Definition at line 101 of file DataHandlerConf.hpp.

101{ return s_input_data_type; }
static const std::string s_input_data_type

◆ __get_input_data_type_str() [2/2]

static const std::string & dunedaq::appmodel::DataHandlerConf::__get_input_data_type_str ( )
inlinestaticnoexcept

Definition at line 101 of file DataHandlerConf.hpp.

101{ return s_input_data_type; }

◆ __get_latency_buffer_str() [1/2]

static const std::string & dunedaq::appmodel::DataHandlerConf::__get_latency_buffer_str ( )
inlinestaticnoexcept

Definition at line 241 of file DataHandlerConf.hpp.

241{ return s_latency_buffer; }
static const std::string s_latency_buffer

◆ __get_latency_buffer_str() [2/2]

static const std::string & dunedaq::appmodel::DataHandlerConf::__get_latency_buffer_str ( )
inlinestaticnoexcept

Definition at line 241 of file DataHandlerConf.hpp.

241{ return s_latency_buffer; }

◆ __get_post_processing_delay_ticks_str() [1/2]

static const std::string & dunedaq::appmodel::DataHandlerConf::__get_post_processing_delay_ticks_str ( )
inlinestaticnoexcept

Definition at line 103 of file DataHandlerConf.hpp.

static const std::string s_post_processing_delay_ticks

◆ __get_post_processing_delay_ticks_str() [2/2]

static const std::string & dunedaq::appmodel::DataHandlerConf::__get_post_processing_delay_ticks_str ( )
inlinestaticnoexcept

Definition at line 103 of file DataHandlerConf.hpp.

◆ __get_request_handler_str() [1/2]

static const std::string & dunedaq::appmodel::DataHandlerConf::__get_request_handler_str ( )
inlinestaticnoexcept

Definition at line 240 of file DataHandlerConf.hpp.

240{ return s_request_handler; }
static const std::string s_request_handler

◆ __get_request_handler_str() [2/2]

static const std::string & dunedaq::appmodel::DataHandlerConf::__get_request_handler_str ( )
inlinestaticnoexcept

Definition at line 240 of file DataHandlerConf.hpp.

240{ return s_request_handler; }

◆ __get_template_for_str() [1/2]

static const std::string & dunedaq::appmodel::DataHandlerConf::__get_template_for_str ( )
inlinestaticnoexcept

Definition at line 100 of file DataHandlerConf.hpp.

100{ return s_template_for; }
static const std::string s_template_for

◆ __get_template_for_str() [2/2]

static const std::string & dunedaq::appmodel::DataHandlerConf::__get_template_for_str ( )
inlinestaticnoexcept

Definition at line 100 of file DataHandlerConf.hpp.

100{ return s_template_for; }

◆ get() [1/4]

std::vector< const dunedaq::conffwk::DalObject * > dunedaq::appmodel::DataHandlerConf::get ( const std::string & name,
bool upcast_unregistered = true ) const
virtual

Get values of relationships and results of some algorithms as a vector of dunedaq::conffwk::DalObject pointers.

Parameters are:

Parameters
namename of the relationship or algorithm
Returns
value of relationship or result of algorithm
Exceptions
std::exceptionif there is no relationship or algorithm with such name in this and base classes

Implements dunedaq::conffwk::DalObject.

Definition at line 99 of file DataHandlerConf.cpp.

100 {
101 std::vector<const dunedaq::conffwk::DalObject *> vec;
102
103 if (!get(name, vec, upcast_unregistered, true))
104 throw_get_ex(name, s_class_name, this);
105
106 return vec;
107 }
static const std::string & s_class_name
virtual std::vector< const dunedaq::conffwk::DalObject * > get(const std::string &name, bool upcast_unregistered=true) const
Get values of relationships and results of some algorithms as a vector of dunedaq::conffwk::DalObject...
static void throw_get_ex(const std::string &what, const std::string &class_name, const DalObject *obj)
throw exception in generated get method (i.e.
Definition DalObject.cpp:82

◆ get() [2/4]

virtual std::vector< const dunedaq::conffwk::DalObject * > dunedaq::appmodel::DataHandlerConf::get ( const std::string & name,
bool upcast_unregistered = true ) const
virtual

Get values of relationships and results of some algorithms as a vector of dunedaq::conffwk::DalObject pointers.

Parameters are:

Parameters
namename of the relationship or algorithm
Returns
value of relationship or result of algorithm
Exceptions
std::exceptionif there is no relationship or algorithm with such name in this and base classes

Implements dunedaq::conffwk::DalObject.

◆ get() [3/4]

bool dunedaq::appmodel::DataHandlerConf::get ( const std::string & name,
std::vector< const dunedaq::conffwk::DalObject * > & vec,
bool upcast_unregistered,
bool first_call ) const
protected

Definition at line 109 of file DataHandlerConf.cpp.

110 {
111 if (first_call)
112 {
113 std::lock_guard scoped_lock(m_mutex);
114
115 check();
116 check_init();
117
118 if (get_rel_objects(name, upcast_unregistered, vec))
119 return true;
120 }
121
122 if (first_call)
123 return get_algo_objects(name, vec);
124
125 return false;
126 }
bool get_rel_objects(const std::string &name, bool upcast_unregistered, std::vector< const DalObject * > &objs) const
Read relationship values as DAL objects using DAL factory.
Definition DalObject.cpp:8
std::mutex m_mutex
Used to protect changes of DAL object.
bool get_algo_objects(const std::string &name, std::vector< const DalObject * > &objs) const
Run algorithm and return result as DAL objects using DAL factory.
Definition DalObject.cpp:25
void check_init() const
Check and initialize object if necessary.

◆ get() [4/4]

bool dunedaq::appmodel::DataHandlerConf::get ( const std::string & name,
std::vector< const dunedaq::conffwk::DalObject * > & vec,
bool upcast_unregistered,
bool first_call ) const
protected

◆ get_data_processor() [1/2]

const dunedaq::appmodel::DataProcessor * dunedaq::appmodel::DataHandlerConf::get_data_processor ( ) const
inline

Get "data_processor" relationship value.

Returns
the relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 314 of file DataHandlerConf.hpp.

315 {
316 std::lock_guard scoped_lock(m_mutex);
317 check();
318 check_init();
319 if (!m_data_processor)
320 {
321 std::ostringstream text;
322 text << "relationship \"" << s_data_processor << "\" of object " << this << " is not set";
323 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
324 }
325 return m_data_processor;
326 }
#define ERS_HERE
Generic configuration exception.

◆ get_data_processor() [2/2]

const dunedaq::appmodel::DataProcessor * dunedaq::appmodel::DataHandlerConf::get_data_processor ( ) const
inline

Get "data_processor" relationship value.

Returns
the relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 314 of file DataHandlerConf.hpp.

315 {
316 std::lock_guard scoped_lock(m_mutex);
317 check();
318 check_init();
319 if (!m_data_processor)
320 {
321 std::ostringstream text;
322 text << "relationship \"" << s_data_processor << "\" of object " << this << " is not set";
323 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
324 }
325 return m_data_processor;
326 }

◆ get_generate_timesync() [1/2]

bool dunedaq::appmodel::DataHandlerConf::get_generate_timesync ( ) const
inline

Get "generate_timesync" attribute value.

Returns
the attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 177 of file DataHandlerConf.hpp.

178 {
179 std::lock_guard scoped_lock(m_mutex);
180 check();
181 check_init();
182 return m_generate_timesync;
183 }

◆ get_generate_timesync() [2/2]

bool dunedaq::appmodel::DataHandlerConf::get_generate_timesync ( ) const
inline

Get "generate_timesync" attribute value.

Returns
the attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 177 of file DataHandlerConf.hpp.

178 {
179 std::lock_guard scoped_lock(m_mutex);
180 check();
181 check_init();
182 return m_generate_timesync;
183 }

◆ get_input_data_type() [1/2]

const std::string & dunedaq::appmodel::DataHandlerConf::get_input_data_type ( ) const
inline

Get "input_data_type" attribute value. Type of data received by this readout module.

Returns
the attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 145 of file DataHandlerConf.hpp.

146 {
147 std::lock_guard scoped_lock(m_mutex);
148 check();
149 check_init();
150 return m_input_data_type;
151 }

◆ get_input_data_type() [2/2]

const std::string & dunedaq::appmodel::DataHandlerConf::get_input_data_type ( ) const
inline

Get "input_data_type" attribute value. Type of data received by this readout module.

Returns
the attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 145 of file DataHandlerConf.hpp.

146 {
147 std::lock_guard scoped_lock(m_mutex);
148 check();
149 check_init();
150 return m_input_data_type;
151 }

◆ get_latency_buffer() [1/2]

const dunedaq::appmodel::LatencyBuffer * dunedaq::appmodel::DataHandlerConf::get_latency_buffer ( ) const
inline

Get "latency_buffer" relationship value.

Returns
the relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 283 of file DataHandlerConf.hpp.

284 {
285 std::lock_guard scoped_lock(m_mutex);
286 check();
287 check_init();
288 if (!m_latency_buffer)
289 {
290 std::ostringstream text;
291 text << "relationship \"" << s_latency_buffer << "\" of object " << this << " is not set";
292 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
293 }
294 return m_latency_buffer;
295 }

◆ get_latency_buffer() [2/2]

const dunedaq::appmodel::LatencyBuffer * dunedaq::appmodel::DataHandlerConf::get_latency_buffer ( ) const
inline

Get "latency_buffer" relationship value.

Returns
the relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 283 of file DataHandlerConf.hpp.

284 {
285 std::lock_guard scoped_lock(m_mutex);
286 check();
287 check_init();
288 if (!m_latency_buffer)
289 {
290 std::ostringstream text;
291 text << "relationship \"" << s_latency_buffer << "\" of object " << this << " is not set";
292 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
293 }
294 return m_latency_buffer;
295 }

◆ get_post_processing_delay_ticks() [1/2]

uint64_t dunedaq::appmodel::DataHandlerConf::get_post_processing_delay_ticks ( ) const
inline

Get "post_processing_delay_ticks" attribute value. Number of clock tick by which post processing of incoming data shall be delayed.

Returns
the attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 209 of file DataHandlerConf.hpp.

210 {
211 std::lock_guard scoped_lock(m_mutex);
212 check();
213 check_init();
215 }

◆ get_post_processing_delay_ticks() [2/2]

uint64_t dunedaq::appmodel::DataHandlerConf::get_post_processing_delay_ticks ( ) const
inline

Get "post_processing_delay_ticks" attribute value. Number of clock tick by which post processing of incoming data shall be delayed.

Returns
the attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 209 of file DataHandlerConf.hpp.

210 {
211 std::lock_guard scoped_lock(m_mutex);
212 check();
213 check_init();
215 }

◆ get_request_handler() [1/2]

const dunedaq::appmodel::RequestHandler * dunedaq::appmodel::DataHandlerConf::get_request_handler ( ) const
inline

Get "request_handler" relationship value.

Returns
the relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 252 of file DataHandlerConf.hpp.

253 {
254 std::lock_guard scoped_lock(m_mutex);
255 check();
256 check_init();
258 {
259 std::ostringstream text;
260 text << "relationship \"" << s_request_handler << "\" of object " << this << " is not set";
261 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
262 }
263 return m_request_handler;
264 }

◆ get_request_handler() [2/2]

const dunedaq::appmodel::RequestHandler * dunedaq::appmodel::DataHandlerConf::get_request_handler ( ) const
inline

Get "request_handler" relationship value.

Returns
the relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 252 of file DataHandlerConf.hpp.

253 {
254 std::lock_guard scoped_lock(m_mutex);
255 check();
256 check_init();
258 {
259 std::ostringstream text;
260 text << "relationship \"" << s_request_handler << "\" of object " << this << " is not set";
261 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
262 }
263 return m_request_handler;
264 }

◆ get_template_for() [1/2]

const std::string & dunedaq::appmodel::DataHandlerConf::get_template_for ( ) const
inline

Get "template_for" attribute value.

Returns
the attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 113 of file DataHandlerConf.hpp.

114 {
115 std::lock_guard scoped_lock(m_mutex);
116 check();
117 check_init();
118 return m_template_for;
119 }

◆ get_template_for() [2/2]

const std::string & dunedaq::appmodel::DataHandlerConf::get_template_for ( ) const
inline

Get "template_for" attribute value.

Returns
the attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 113 of file DataHandlerConf.hpp.

114 {
115 std::lock_guard scoped_lock(m_mutex);
116 check();
117 check_init();
118 return m_template_for;
119 }

◆ init() [1/2]

void dunedaq::appmodel::DataHandlerConf::init ( bool init_children)
protectedvirtual

Initialize object (method generated by genconffwk)

Parameters
init_childrenif true, initialize referenced objects

Implements dunedaq::conffwk::DalObject.

Definition at line 75 of file DataHandlerConf.cpp.

76 {
77 p_was_read = true;
79 TLOG_DEBUG(5) << "read object " << this << " (class " << s_class_name << ')';
80
81 try {
89 }
90 catch (dunedaq::conffwk::Exception & ex) {
91 throw_init_ex(ex);
92 }
93 }
void get(const std::string &name, T &value)
Get value of object's attribute or relationship.
void throw_init_ex(dunedaq::conffwk::Exception &ex)
throw object initialisation exception (i.e.
Definition DalObject.cpp:74
void increment_read() noexcept
DalRegistry & p_registry
Configuration object.
bool p_was_read
is true, if the object was read
ConfigObject p_obj
Config object used by given template object.
const T * _ref(ConfigObject &obj, const std::string &name, bool read_children)
Get signle value of object's relation and instantiate result with it (multi-thread safe).
#define TLOG_DEBUG(lvl,...)
Definition Logging.hpp:112

◆ init() [2/2]

virtual void dunedaq::appmodel::DataHandlerConf::init ( bool init_children)
protectedvirtual

Initialize object (method generated by genconffwk)

Parameters
init_childrenif true, initialize referenced objects

Implements dunedaq::conffwk::DalObject.

◆ print() [1/2]

void dunedaq::appmodel::DataHandlerConf::print ( unsigned int offset,
bool print_header,
std::ostream & s ) const
virtual

Print details of the DataHandlerConf object.

Parameters are:

Parameters
offsetnumber of spaces to shift object right (useful to print nested objects)
print_headerif false, do not print object header (to print attributes of base classes)
soutput stream

Implements dunedaq::conffwk::DalObject.

Definition at line 44 of file DataHandlerConf.cpp.

45 {
46 check_init();
47
48 try {
49 const std::string str(indent+2, ' ');
50
51 if (print_header)
52 p_hdr(s, indent, s_class_name, "dunedaq::appmodel");
53
54
55 // print direct attributes
56
61
62
63 // print direct relationships
64
68 }
69 catch (dunedaq::conffwk::Exception & ex) {
71 }
72 }
void p_hdr(std::ostream &s, unsigned int indent, const std::string &cl, const char *nm=nullptr) const
print object headers
Definition DalObject.cpp:65
static void p_error(std::ostream &s, dunedaq::conffwk::Exception &ex)
print error text
Definition DalObject.cpp:59
void p_sv_rel(std::ostream &s, const std::string &str, const std::string &name, const DalObject *obj)
print weak single-value relationship
void p_sv_attr(std::ostream &s, const std::string &str, const std::string &name, const T &val) noexcept
print single-value attribute

◆ print() [2/2]

virtual void dunedaq::appmodel::DataHandlerConf::print ( unsigned int offset,
bool print_header,
std::ostream & s ) const
virtual

Print details of the DataHandlerConf object.

Parameters are:

Parameters
offsetnumber of spaces to shift object right (useful to print nested objects)
print_headerif false, do not print object header (to print attributes of base classes)
soutput stream

Implements dunedaq::conffwk::DalObject.

◆ set_data_processor() [1/2]

void dunedaq::appmodel::DataHandlerConf::set_data_processor ( const dunedaq::appmodel::DataProcessor * value)

Set "data_processor" relationship value.

Parameters
valuenew relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 138 of file DataHandlerConf.cpp.

139 {
141 }
void _set_object(const std::string &name, const T *value)
Helper method for generated set single-value relationship methods.

◆ set_data_processor() [2/2]

void dunedaq::appmodel::DataHandlerConf::set_data_processor ( const dunedaq::appmodel::DataProcessor * value)

Set "data_processor" relationship value.

Parameters
valuenew relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

◆ set_generate_timesync() [1/2]

void dunedaq::appmodel::DataHandlerConf::set_generate_timesync ( bool value)
inline

Set "generate_timesync" attribute value.

Parameters
valuenew attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 192 of file DataHandlerConf.hpp.

193 {
194 std::lock_guard scoped_lock(m_mutex);
195 check();
196 clear();
198 }
void set_by_val(const std::string &name, T value)
Set attribute value.

◆ set_generate_timesync() [2/2]

void dunedaq::appmodel::DataHandlerConf::set_generate_timesync ( bool value)
inline

Set "generate_timesync" attribute value.

Parameters
valuenew attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 192 of file DataHandlerConf.hpp.

193 {
194 std::lock_guard scoped_lock(m_mutex);
195 check();
196 clear();
198 }

◆ set_input_data_type() [1/2]

void dunedaq::appmodel::DataHandlerConf::set_input_data_type ( const std::string & value)
inline

Set "input_data_type" attribute value. Type of data received by this readout module.

Parameters
valuenew attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 161 of file DataHandlerConf.hpp.

162 {
163 std::lock_guard scoped_lock(m_mutex);
164 check();
165 clear();
167 }
void set_by_ref(const std::string &name, T &value)
Set attribute value.

◆ set_input_data_type() [2/2]

void dunedaq::appmodel::DataHandlerConf::set_input_data_type ( const std::string & value)
inline

Set "input_data_type" attribute value. Type of data received by this readout module.

Parameters
valuenew attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 161 of file DataHandlerConf.hpp.

162 {
163 std::lock_guard scoped_lock(m_mutex);
164 check();
165 clear();
167 }

◆ set_latency_buffer() [1/2]

void dunedaq::appmodel::DataHandlerConf::set_latency_buffer ( const dunedaq::appmodel::LatencyBuffer * value)

Set "latency_buffer" relationship value.

Parameters
valuenew relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 133 of file DataHandlerConf.cpp.

134 {
136 }

◆ set_latency_buffer() [2/2]

void dunedaq::appmodel::DataHandlerConf::set_latency_buffer ( const dunedaq::appmodel::LatencyBuffer * value)

Set "latency_buffer" relationship value.

Parameters
valuenew relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

◆ set_post_processing_delay_ticks() [1/2]

void dunedaq::appmodel::DataHandlerConf::set_post_processing_delay_ticks ( uint64_t value)
inline

Set "post_processing_delay_ticks" attribute value. Number of clock tick by which post processing of incoming data shall be delayed.

Parameters
valuenew attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 225 of file DataHandlerConf.hpp.

226 {
227 std::lock_guard scoped_lock(m_mutex);
228 check();
229 clear();
231 }

◆ set_post_processing_delay_ticks() [2/2]

void dunedaq::appmodel::DataHandlerConf::set_post_processing_delay_ticks ( uint64_t value)
inline

Set "post_processing_delay_ticks" attribute value. Number of clock tick by which post processing of incoming data shall be delayed.

Parameters
valuenew attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 225 of file DataHandlerConf.hpp.

226 {
227 std::lock_guard scoped_lock(m_mutex);
228 check();
229 clear();
231 }

◆ set_request_handler() [1/2]

void dunedaq::appmodel::DataHandlerConf::set_request_handler ( const dunedaq::appmodel::RequestHandler * value)

Set "request_handler" relationship value.

Parameters
valuenew relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 128 of file DataHandlerConf.cpp.

129 {
131 }

◆ set_request_handler() [2/2]

void dunedaq::appmodel::DataHandlerConf::set_request_handler ( const dunedaq::appmodel::RequestHandler * value)

Set "request_handler" relationship value.

Parameters
valuenew relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

◆ set_template_for() [1/2]

void dunedaq::appmodel::DataHandlerConf::set_template_for ( const std::string & value)
inline

Set "template_for" attribute value.

Parameters
valuenew attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 128 of file DataHandlerConf.hpp.

129 {
130 std::lock_guard scoped_lock(m_mutex);
131 check();
132 clear();
134 }
void set_class(const std::string &name, const std::string &value)
Set attribute class value.

◆ set_template_for() [2/2]

void dunedaq::appmodel::DataHandlerConf::set_template_for ( const std::string & value)
inline

Set "template_for" attribute value.

Parameters
valuenew attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 128 of file DataHandlerConf.hpp.

129 {
130 std::lock_guard scoped_lock(m_mutex);
131 check();
132 clear();
134 }

Friends And Related Symbol Documentation

◆ conffwk::Configuration

Definition at line 33 of file DataHandlerConf.hpp.

◆ conffwk::DalFactory

conffwk::DalFactory
friend

Definition at line 35 of file DataHandlerConf.hpp.

◆ conffwk::DalObject

Definition at line 34 of file DataHandlerConf.hpp.

◆ conffwk::DalRegistry

Definition at line 36 of file DataHandlerConf.hpp.

Member Data Documentation

◆ m_data_processor

const dunedaq::appmodel::DataProcessor * dunedaq::appmodel::DataHandlerConf::m_data_processor
private

Definition at line 88 of file DataHandlerConf.hpp.

◆ m_generate_timesync

bool dunedaq::appmodel::DataHandlerConf::m_generate_timesync
private

Definition at line 84 of file DataHandlerConf.hpp.

◆ m_input_data_type

std::string dunedaq::appmodel::DataHandlerConf::m_input_data_type
private

Definition at line 83 of file DataHandlerConf.hpp.

◆ m_latency_buffer

const dunedaq::appmodel::LatencyBuffer * dunedaq::appmodel::DataHandlerConf::m_latency_buffer
private

Definition at line 87 of file DataHandlerConf.hpp.

◆ m_post_processing_delay_ticks

uint64_t dunedaq::appmodel::DataHandlerConf::m_post_processing_delay_ticks
private

Definition at line 85 of file DataHandlerConf.hpp.

◆ m_request_handler

const dunedaq::appmodel::RequestHandler * dunedaq::appmodel::DataHandlerConf::m_request_handler
private

Definition at line 86 of file DataHandlerConf.hpp.

◆ m_template_for

std::string dunedaq::appmodel::DataHandlerConf::m_template_for
private

Definition at line 82 of file DataHandlerConf.hpp.

◆ s_class_name

static const std::string & dunedaq::appmodel::DataHandlerConf::s_class_name
static

The name of the configuration class.

Definition at line 48 of file DataHandlerConf.hpp.

◆ s_data_processor

static const std::string dunedaq::appmodel::DataHandlerConf::s_data_processor = "data_processor"
inlinestatic

Definition at line 238 of file DataHandlerConf.hpp.

◆ s_generate_timesync

static const std::string dunedaq::appmodel::DataHandlerConf::s_generate_timesync = "generate_timesync"
inlinestatic

Definition at line 97 of file DataHandlerConf.hpp.

◆ s_input_data_type

static const std::string dunedaq::appmodel::DataHandlerConf::s_input_data_type = "input_data_type"
inlinestatic

Definition at line 96 of file DataHandlerConf.hpp.

◆ s_latency_buffer

static const std::string dunedaq::appmodel::DataHandlerConf::s_latency_buffer = "latency_buffer"
inlinestatic

Definition at line 237 of file DataHandlerConf.hpp.

◆ s_post_processing_delay_ticks

static const std::string dunedaq::appmodel::DataHandlerConf::s_post_processing_delay_ticks = "post_processing_delay_ticks"
inlinestatic

Definition at line 98 of file DataHandlerConf.hpp.

◆ s_request_handler

static const std::string dunedaq::appmodel::DataHandlerConf::s_request_handler = "request_handler"
inlinestatic

Definition at line 236 of file DataHandlerConf.hpp.

◆ s_template_for

static const std::string dunedaq::appmodel::DataHandlerConf::s_template_for = "template_for"
inlinestatic

Definition at line 95 of file DataHandlerConf.hpp.


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