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

#include <StreamEmulationParameters.hpp>

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

Public Member Functions

virtual void print (unsigned int offset, bool print_header, std::ostream &s) const
 Print details of the StreamEmulationParameters 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_data_file_name () const
 Get "data_file_name" attribute value.
 
void set_data_file_name (const std::string &value)
 Set "data_file_name" attribute value.
 
const std::string & get_tp_data_file_name () const
 Get "tp_data_file_name" attribute value.
 
void set_tp_data_file_name (const std::string &value)
 Set "tp_data_file_name" attribute value.
 
uint32_t get_input_file_size_limit () const
 Get "input_file_size_limit" attribute value.
 
void set_input_file_size_limit (uint32_t value)
 Set "input_file_size_limit" attribute value.
 
bool get_set_t0 () const
 Get "set_t0" attribute value. Set first timestamp to now.
 
void set_set_t0 (bool value)
 Set "set_t0" attribute value. Set first timestamp to now.
 
uint32_t get_random_population_size () const
 Get "random_population_size" attribute value.
 
void set_random_population_size (uint32_t value)
 Set "random_population_size" attribute value.
 
float get_frame_error_rate_hz () const
 Get "frame_error_rate_hz" attribute value.
 
void set_frame_error_rate_hz (float value)
 Set "frame_error_rate_hz" attribute value.
 
bool get_generate_periodic_adc_pattern () const
 Get "generate_periodic_adc_pattern" attribute value.
 
void set_generate_periodic_adc_pattern (bool value)
 Set "generate_periodic_adc_pattern" attribute value.
 
float get_TP_rate_per_channel () const
 Get "TP_rate_per_channel" attribute value. TP rate per channel in units of 100 Hz.
 
void set_TP_rate_per_channel (float value)
 Set "TP_rate_per_channel" attribute value. TP rate per channel in units of 100 Hz.
 
virtual void print (unsigned int offset, bool print_header, std::ostream &s) const
 Print details of the StreamEmulationParameters 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_data_file_name () const
 Get "data_file_name" attribute value.
 
void set_data_file_name (const std::string &value)
 Set "data_file_name" attribute value.
 
const std::string & get_tp_data_file_name () const
 Get "tp_data_file_name" attribute value.
 
void set_tp_data_file_name (const std::string &value)
 Set "tp_data_file_name" attribute value.
 
uint32_t get_input_file_size_limit () const
 Get "input_file_size_limit" attribute value.
 
void set_input_file_size_limit (uint32_t value)
 Set "input_file_size_limit" attribute value.
 
bool get_set_t0 () const
 Get "set_t0" attribute value. Set first timestamp to now.
 
void set_set_t0 (bool value)
 Set "set_t0" attribute value. Set first timestamp to now.
 
uint32_t get_random_population_size () const
 Get "random_population_size" attribute value.
 
void set_random_population_size (uint32_t value)
 Set "random_population_size" attribute value.
 
float get_frame_error_rate_hz () const
 Get "frame_error_rate_hz" attribute value.
 
void set_frame_error_rate_hz (float value)
 Set "frame_error_rate_hz" attribute value.
 
bool get_generate_periodic_adc_pattern () const
 Get "generate_periodic_adc_pattern" attribute value.
 
void set_generate_periodic_adc_pattern (bool value)
 Set "generate_periodic_adc_pattern" attribute value.
 
float get_TP_rate_per_channel () const
 Get "TP_rate_per_channel" attribute value. TP rate per channel in units of 100 Hz.
 
void set_TP_rate_per_channel (float value)
 Set "TP_rate_per_channel" attribute value. TP rate per channel in units of 100 Hz.
 
- 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_data_file_name_str () noexcept
 
static const std::string & __get_tp_data_file_name_str () noexcept
 
static const std::string & __get_input_file_size_limit_str () noexcept
 
static const std::string & __get_set_t0_str () noexcept
 
static const std::string & __get_random_population_size_str () noexcept
 
static const std::string & __get_frame_error_rate_hz_str () noexcept
 
static const std::string & __get_generate_periodic_adc_pattern_str () noexcept
 
static const std::string & __get_TP_rate_per_channel_str () noexcept
 
static const std::string & __get_data_file_name_str () noexcept
 
static const std::string & __get_tp_data_file_name_str () noexcept
 
static const std::string & __get_input_file_size_limit_str () noexcept
 
static const std::string & __get_set_t0_str () noexcept
 
static const std::string & __get_random_population_size_str () noexcept
 
static const std::string & __get_frame_error_rate_hz_str () noexcept
 
static const std::string & __get_generate_periodic_adc_pattern_str () noexcept
 
static const std::string & __get_TP_rate_per_channel_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_data_file_name = "data_file_name"
 
static const std::string s_tp_data_file_name = "tp_data_file_name"
 
static const std::string s_input_file_size_limit = "input_file_size_limit"
 
static const std::string s_set_t0 = "set_t0"
 
static const std::string s_random_population_size = "random_population_size"
 
static const std::string s_frame_error_rate_hz = "frame_error_rate_hz"
 
static const std::string s_generate_periodic_adc_pattern = "generate_periodic_adc_pattern"
 
static const std::string s_TP_rate_per_channel = "TP_rate_per_channel"
 

Protected Member Functions

 StreamEmulationParameters (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~StreamEmulationParameters () 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
 
 StreamEmulationParameters (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~StreamEmulationParameters () 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_data_file_name
 
std::string m_tp_data_file_name
 
uint32_t m_input_file_size_limit
 
bool m_set_t0
 
uint32_t m_random_population_size
 
float m_frame_error_rate_hz
 
bool m_generate_periodic_adc_pattern
 
float m_TP_rate_per_channel
 

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 20 of file StreamEmulationParameters.hpp.

Constructor & Destructor Documentation

◆ StreamEmulationParameters() [1/2]

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

Definition at line 26 of file StreamEmulationParameters.cpp.

26 :
28 {
29 ;
30 }
The base class for any generated DAL object.
Definition DalObject.hpp:45

◆ ~StreamEmulationParameters() [1/2]

dunedaq::appmodel::StreamEmulationParameters::~StreamEmulationParameters ( )
protectedvirtualnoexcept

Definition at line 82 of file StreamEmulationParameters.cpp.

83 {
84 }

◆ StreamEmulationParameters() [2/2]

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

◆ ~StreamEmulationParameters() [2/2]

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

Member Function Documentation

◆ __get_data_file_name_str() [1/2]

static const std::string & dunedaq::appmodel::StreamEmulationParameters::__get_data_file_name_str ( )
inlinestaticnoexcept

Definition at line 94 of file StreamEmulationParameters.hpp.

◆ __get_data_file_name_str() [2/2]

static const std::string & dunedaq::appmodel::StreamEmulationParameters::__get_data_file_name_str ( )
inlinestaticnoexcept

Definition at line 94 of file StreamEmulationParameters.hpp.

94{ return s_data_file_name; }

◆ __get_frame_error_rate_hz_str() [1/2]

static const std::string & dunedaq::appmodel::StreamEmulationParameters::__get_frame_error_rate_hz_str ( )
inlinestaticnoexcept

Definition at line 99 of file StreamEmulationParameters.hpp.

◆ __get_frame_error_rate_hz_str() [2/2]

static const std::string & dunedaq::appmodel::StreamEmulationParameters::__get_frame_error_rate_hz_str ( )
inlinestaticnoexcept

Definition at line 99 of file StreamEmulationParameters.hpp.

99{ return s_frame_error_rate_hz; }

◆ __get_generate_periodic_adc_pattern_str() [1/2]

static const std::string & dunedaq::appmodel::StreamEmulationParameters::__get_generate_periodic_adc_pattern_str ( )
inlinestaticnoexcept

Definition at line 100 of file StreamEmulationParameters.hpp.

◆ __get_generate_periodic_adc_pattern_str() [2/2]

static const std::string & dunedaq::appmodel::StreamEmulationParameters::__get_generate_periodic_adc_pattern_str ( )
inlinestaticnoexcept

Definition at line 100 of file StreamEmulationParameters.hpp.

◆ __get_input_file_size_limit_str() [1/2]

static const std::string & dunedaq::appmodel::StreamEmulationParameters::__get_input_file_size_limit_str ( )
inlinestaticnoexcept

Definition at line 96 of file StreamEmulationParameters.hpp.

◆ __get_input_file_size_limit_str() [2/2]

static const std::string & dunedaq::appmodel::StreamEmulationParameters::__get_input_file_size_limit_str ( )
inlinestaticnoexcept

Definition at line 96 of file StreamEmulationParameters.hpp.

◆ __get_random_population_size_str() [1/2]

static const std::string & dunedaq::appmodel::StreamEmulationParameters::__get_random_population_size_str ( )
inlinestaticnoexcept

Definition at line 98 of file StreamEmulationParameters.hpp.

◆ __get_random_population_size_str() [2/2]

static const std::string & dunedaq::appmodel::StreamEmulationParameters::__get_random_population_size_str ( )
inlinestaticnoexcept

Definition at line 98 of file StreamEmulationParameters.hpp.

◆ __get_set_t0_str() [1/2]

static const std::string & dunedaq::appmodel::StreamEmulationParameters::__get_set_t0_str ( )
inlinestaticnoexcept

Definition at line 97 of file StreamEmulationParameters.hpp.

◆ __get_set_t0_str() [2/2]

static const std::string & dunedaq::appmodel::StreamEmulationParameters::__get_set_t0_str ( )
inlinestaticnoexcept

Definition at line 97 of file StreamEmulationParameters.hpp.

97{ return s_set_t0; }

◆ __get_tp_data_file_name_str() [1/2]

static const std::string & dunedaq::appmodel::StreamEmulationParameters::__get_tp_data_file_name_str ( )
inlinestaticnoexcept

Definition at line 95 of file StreamEmulationParameters.hpp.

◆ __get_tp_data_file_name_str() [2/2]

static const std::string & dunedaq::appmodel::StreamEmulationParameters::__get_tp_data_file_name_str ( )
inlinestaticnoexcept

Definition at line 95 of file StreamEmulationParameters.hpp.

95{ return s_tp_data_file_name; }

◆ __get_TP_rate_per_channel_str() [1/2]

static const std::string & dunedaq::appmodel::StreamEmulationParameters::__get_TP_rate_per_channel_str ( )
inlinestaticnoexcept

Definition at line 101 of file StreamEmulationParameters.hpp.

◆ __get_TP_rate_per_channel_str() [2/2]

static const std::string & dunedaq::appmodel::StreamEmulationParameters::__get_TP_rate_per_channel_str ( )
inlinestaticnoexcept

Definition at line 101 of file StreamEmulationParameters.hpp.

101{ return s_TP_rate_per_channel; }

◆ get() [1/4]

std::vector< const dunedaq::conffwk::DalObject * > dunedaq::appmodel::StreamEmulationParameters::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 86 of file StreamEmulationParameters.cpp.

87 {
88 std::vector<const dunedaq::conffwk::DalObject *> vec;
89
90 if (!get(name, vec, upcast_unregistered, true))
91 throw_get_ex(name, s_class_name, this);
92
93 return vec;
94 }
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::StreamEmulationParameters::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::StreamEmulationParameters::get ( const std::string & name,
std::vector< const dunedaq::conffwk::DalObject * > & vec,
bool upcast_unregistered,
bool first_call ) const
protected

Definition at line 96 of file StreamEmulationParameters.cpp.

97 {
98 if (first_call)
99 {
100 std::lock_guard scoped_lock(m_mutex);
101
102 check();
103 check_init();
104
105 if (get_rel_objects(name, upcast_unregistered, vec))
106 return true;
107 }
108
109 if (first_call)
110 return get_algo_objects(name, vec);
111
112 return false;
113 }
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::StreamEmulationParameters::get ( const std::string & name,
std::vector< const dunedaq::conffwk::DalObject * > & vec,
bool upcast_unregistered,
bool first_call ) const
protected

◆ get_data_file_name() [1/2]

const std::string & dunedaq::appmodel::StreamEmulationParameters::get_data_file_name ( ) const
inline

Get "data_file_name" attribute value.

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

Definition at line 111 of file StreamEmulationParameters.hpp.

112 {
113 std::lock_guard scoped_lock(m_mutex);
114 check();
115 check_init();
116 return m_data_file_name;
117 }

◆ get_data_file_name() [2/2]

const std::string & dunedaq::appmodel::StreamEmulationParameters::get_data_file_name ( ) const
inline

Get "data_file_name" attribute value.

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

Definition at line 111 of file StreamEmulationParameters.hpp.

112 {
113 std::lock_guard scoped_lock(m_mutex);
114 check();
115 check_init();
116 return m_data_file_name;
117 }

◆ get_frame_error_rate_hz() [1/2]

float dunedaq::appmodel::StreamEmulationParameters::get_frame_error_rate_hz ( ) const
inline

Get "frame_error_rate_hz" attribute value.

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

Definition at line 268 of file StreamEmulationParameters.hpp.

269 {
270 std::lock_guard scoped_lock(m_mutex);
271 check();
272 check_init();
274 }

◆ get_frame_error_rate_hz() [2/2]

float dunedaq::appmodel::StreamEmulationParameters::get_frame_error_rate_hz ( ) const
inline

Get "frame_error_rate_hz" attribute value.

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

Definition at line 268 of file StreamEmulationParameters.hpp.

269 {
270 std::lock_guard scoped_lock(m_mutex);
271 check();
272 check_init();
274 }

◆ get_generate_periodic_adc_pattern() [1/2]

bool dunedaq::appmodel::StreamEmulationParameters::get_generate_periodic_adc_pattern ( ) const
inline

Get "generate_periodic_adc_pattern" attribute value.

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

Definition at line 299 of file StreamEmulationParameters.hpp.

300 {
301 std::lock_guard scoped_lock(m_mutex);
302 check();
303 check_init();
305 }

◆ get_generate_periodic_adc_pattern() [2/2]

bool dunedaq::appmodel::StreamEmulationParameters::get_generate_periodic_adc_pattern ( ) const
inline

Get "generate_periodic_adc_pattern" attribute value.

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

Definition at line 299 of file StreamEmulationParameters.hpp.

300 {
301 std::lock_guard scoped_lock(m_mutex);
302 check();
303 check_init();
305 }

◆ get_input_file_size_limit() [1/2]

uint32_t dunedaq::appmodel::StreamEmulationParameters::get_input_file_size_limit ( ) const
inline

Get "input_file_size_limit" attribute value.

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

Definition at line 173 of file StreamEmulationParameters.hpp.

174 {
175 std::lock_guard scoped_lock(m_mutex);
176 check();
177 check_init();
179 }

◆ get_input_file_size_limit() [2/2]

uint32_t dunedaq::appmodel::StreamEmulationParameters::get_input_file_size_limit ( ) const
inline

Get "input_file_size_limit" attribute value.

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

Definition at line 173 of file StreamEmulationParameters.hpp.

174 {
175 std::lock_guard scoped_lock(m_mutex);
176 check();
177 check_init();
179 }

◆ get_random_population_size() [1/2]

uint32_t dunedaq::appmodel::StreamEmulationParameters::get_random_population_size ( ) const
inline

Get "random_population_size" attribute value.

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

Definition at line 237 of file StreamEmulationParameters.hpp.

238 {
239 std::lock_guard scoped_lock(m_mutex);
240 check();
241 check_init();
243 }

◆ get_random_population_size() [2/2]

uint32_t dunedaq::appmodel::StreamEmulationParameters::get_random_population_size ( ) const
inline

Get "random_population_size" attribute value.

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

Definition at line 237 of file StreamEmulationParameters.hpp.

238 {
239 std::lock_guard scoped_lock(m_mutex);
240 check();
241 check_init();
243 }

◆ get_set_t0() [1/2]

bool dunedaq::appmodel::StreamEmulationParameters::get_set_t0 ( ) const
inline

Get "set_t0" attribute value. Set first timestamp to now.

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

Definition at line 205 of file StreamEmulationParameters.hpp.

206 {
207 std::lock_guard scoped_lock(m_mutex);
208 check();
209 check_init();
210 return m_set_t0;
211 }

◆ get_set_t0() [2/2]

bool dunedaq::appmodel::StreamEmulationParameters::get_set_t0 ( ) const
inline

Get "set_t0" attribute value. Set first timestamp to now.

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

Definition at line 205 of file StreamEmulationParameters.hpp.

206 {
207 std::lock_guard scoped_lock(m_mutex);
208 check();
209 check_init();
210 return m_set_t0;
211 }

◆ get_tp_data_file_name() [1/2]

const std::string & dunedaq::appmodel::StreamEmulationParameters::get_tp_data_file_name ( ) const
inline

Get "tp_data_file_name" attribute value.

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

Definition at line 142 of file StreamEmulationParameters.hpp.

143 {
144 std::lock_guard scoped_lock(m_mutex);
145 check();
146 check_init();
147 return m_tp_data_file_name;
148 }

◆ get_tp_data_file_name() [2/2]

const std::string & dunedaq::appmodel::StreamEmulationParameters::get_tp_data_file_name ( ) const
inline

Get "tp_data_file_name" attribute value.

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

Definition at line 142 of file StreamEmulationParameters.hpp.

143 {
144 std::lock_guard scoped_lock(m_mutex);
145 check();
146 check_init();
147 return m_tp_data_file_name;
148 }

◆ get_TP_rate_per_channel() [1/2]

float dunedaq::appmodel::StreamEmulationParameters::get_TP_rate_per_channel ( ) const
inline

Get "TP_rate_per_channel" attribute value. TP rate per channel in units of 100 Hz.

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

Definition at line 331 of file StreamEmulationParameters.hpp.

332 {
333 std::lock_guard scoped_lock(m_mutex);
334 check();
335 check_init();
337 }

◆ get_TP_rate_per_channel() [2/2]

float dunedaq::appmodel::StreamEmulationParameters::get_TP_rate_per_channel ( ) const
inline

Get "TP_rate_per_channel" attribute value. TP rate per channel in units of 100 Hz.

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

Definition at line 331 of file StreamEmulationParameters.hpp.

332 {
333 std::lock_guard scoped_lock(m_mutex);
334 check();
335 check_init();
337 }

◆ init() [1/2]

void dunedaq::appmodel::StreamEmulationParameters::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 61 of file StreamEmulationParameters.cpp.

62 {
63 p_was_read = true;
65 TLOG_DEBUG(5) << "read object " << this << " (class " << s_class_name << ')';
66
67 try {
76 }
77 catch (dunedaq::conffwk::Exception & ex) {
78 throw_init_ex(ex);
79 }
80 }
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
bool p_was_read
is true, if the object was read
ConfigObject p_obj
Config object used by given template object.
#define TLOG_DEBUG(lvl,...)
Definition Logging.hpp:112

◆ init() [2/2]

virtual void dunedaq::appmodel::StreamEmulationParameters::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::StreamEmulationParameters::print ( unsigned int offset,
bool print_header,
std::ostream & s ) const
virtual

Print details of the StreamEmulationParameters 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 33 of file StreamEmulationParameters.cpp.

34 {
35 check_init();
36
37 try {
38 const std::string str(indent+2, ' ');
39
40 if (print_header)
41 p_hdr(s, indent, s_class_name, "dunedaq::appmodel");
42
43
44 // print direct attributes
45
54 }
55 catch (dunedaq::conffwk::Exception & ex) {
57 }
58 }
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_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::StreamEmulationParameters::print ( unsigned int offset,
bool print_header,
std::ostream & s ) const
virtual

Print details of the StreamEmulationParameters 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_file_name() [1/2]

void dunedaq::appmodel::StreamEmulationParameters::set_data_file_name ( const std::string & value)
inline

Set "data_file_name" attribute value.

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

Definition at line 126 of file StreamEmulationParameters.hpp.

127 {
128 std::lock_guard scoped_lock(m_mutex);
129 check();
130 clear();
132 }
void set_by_ref(const std::string &name, T &value)
Set attribute value.

◆ set_data_file_name() [2/2]

void dunedaq::appmodel::StreamEmulationParameters::set_data_file_name ( const std::string & value)
inline

Set "data_file_name" attribute value.

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

Definition at line 126 of file StreamEmulationParameters.hpp.

127 {
128 std::lock_guard scoped_lock(m_mutex);
129 check();
130 clear();
132 }

◆ set_frame_error_rate_hz() [1/2]

void dunedaq::appmodel::StreamEmulationParameters::set_frame_error_rate_hz ( float value)
inline

Set "frame_error_rate_hz" attribute value.

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

Definition at line 283 of file StreamEmulationParameters.hpp.

284 {
285 std::lock_guard scoped_lock(m_mutex);
286 check();
287 clear();
289 }
void set_by_val(const std::string &name, T value)
Set attribute value.

◆ set_frame_error_rate_hz() [2/2]

void dunedaq::appmodel::StreamEmulationParameters::set_frame_error_rate_hz ( float value)
inline

Set "frame_error_rate_hz" attribute value.

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

Definition at line 283 of file StreamEmulationParameters.hpp.

284 {
285 std::lock_guard scoped_lock(m_mutex);
286 check();
287 clear();
289 }

◆ set_generate_periodic_adc_pattern() [1/2]

void dunedaq::appmodel::StreamEmulationParameters::set_generate_periodic_adc_pattern ( bool value)
inline

Set "generate_periodic_adc_pattern" attribute value.

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

Definition at line 314 of file StreamEmulationParameters.hpp.

315 {
316 std::lock_guard scoped_lock(m_mutex);
317 check();
318 clear();
320 }

◆ set_generate_periodic_adc_pattern() [2/2]

void dunedaq::appmodel::StreamEmulationParameters::set_generate_periodic_adc_pattern ( bool value)
inline

Set "generate_periodic_adc_pattern" attribute value.

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

Definition at line 314 of file StreamEmulationParameters.hpp.

315 {
316 std::lock_guard scoped_lock(m_mutex);
317 check();
318 clear();
320 }

◆ set_input_file_size_limit() [1/2]

void dunedaq::appmodel::StreamEmulationParameters::set_input_file_size_limit ( uint32_t value)
inline

Set "input_file_size_limit" attribute value.

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

Definition at line 188 of file StreamEmulationParameters.hpp.

189 {
190 std::lock_guard scoped_lock(m_mutex);
191 check();
192 clear();
194 }

◆ set_input_file_size_limit() [2/2]

void dunedaq::appmodel::StreamEmulationParameters::set_input_file_size_limit ( uint32_t value)
inline

Set "input_file_size_limit" attribute value.

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

Definition at line 188 of file StreamEmulationParameters.hpp.

189 {
190 std::lock_guard scoped_lock(m_mutex);
191 check();
192 clear();
194 }

◆ set_random_population_size() [1/2]

void dunedaq::appmodel::StreamEmulationParameters::set_random_population_size ( uint32_t value)
inline

Set "random_population_size" attribute value.

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

Definition at line 252 of file StreamEmulationParameters.hpp.

253 {
254 std::lock_guard scoped_lock(m_mutex);
255 check();
256 clear();
258 }

◆ set_random_population_size() [2/2]

void dunedaq::appmodel::StreamEmulationParameters::set_random_population_size ( uint32_t value)
inline

Set "random_population_size" attribute value.

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

Definition at line 252 of file StreamEmulationParameters.hpp.

253 {
254 std::lock_guard scoped_lock(m_mutex);
255 check();
256 clear();
258 }

◆ set_set_t0() [1/2]

void dunedaq::appmodel::StreamEmulationParameters::set_set_t0 ( bool value)
inline

Set "set_t0" attribute value. Set first timestamp to now.

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

Definition at line 221 of file StreamEmulationParameters.hpp.

222 {
223 std::lock_guard scoped_lock(m_mutex);
224 check();
225 clear();
226 p_obj.set_by_val(s_set_t0, value);
227 }

◆ set_set_t0() [2/2]

void dunedaq::appmodel::StreamEmulationParameters::set_set_t0 ( bool value)
inline

Set "set_t0" attribute value. Set first timestamp to now.

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

Definition at line 221 of file StreamEmulationParameters.hpp.

222 {
223 std::lock_guard scoped_lock(m_mutex);
224 check();
225 clear();
226 p_obj.set_by_val(s_set_t0, value);
227 }

◆ set_tp_data_file_name() [1/2]

void dunedaq::appmodel::StreamEmulationParameters::set_tp_data_file_name ( const std::string & value)
inline

Set "tp_data_file_name" attribute value.

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

Definition at line 157 of file StreamEmulationParameters.hpp.

158 {
159 std::lock_guard scoped_lock(m_mutex);
160 check();
161 clear();
163 }

◆ set_tp_data_file_name() [2/2]

void dunedaq::appmodel::StreamEmulationParameters::set_tp_data_file_name ( const std::string & value)
inline

Set "tp_data_file_name" attribute value.

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

Definition at line 157 of file StreamEmulationParameters.hpp.

158 {
159 std::lock_guard scoped_lock(m_mutex);
160 check();
161 clear();
163 }

◆ set_TP_rate_per_channel() [1/2]

void dunedaq::appmodel::StreamEmulationParameters::set_TP_rate_per_channel ( float value)
inline

Set "TP_rate_per_channel" attribute value. TP rate per channel in units of 100 Hz.

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

Definition at line 347 of file StreamEmulationParameters.hpp.

348 {
349 std::lock_guard scoped_lock(m_mutex);
350 check();
351 clear();
353 }

◆ set_TP_rate_per_channel() [2/2]

void dunedaq::appmodel::StreamEmulationParameters::set_TP_rate_per_channel ( float value)
inline

Set "TP_rate_per_channel" attribute value. TP rate per channel in units of 100 Hz.

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

Definition at line 347 of file StreamEmulationParameters.hpp.

348 {
349 std::lock_guard scoped_lock(m_mutex);
350 check();
351 clear();
353 }

Friends And Related Symbol Documentation

◆ conffwk::Configuration

Definition at line 22 of file StreamEmulationParameters.hpp.

◆ conffwk::DalFactory

conffwk::DalFactory
friend

Definition at line 24 of file StreamEmulationParameters.hpp.

◆ conffwk::DalObject

Definition at line 23 of file StreamEmulationParameters.hpp.

◆ conffwk::DalRegistry

Definition at line 25 of file StreamEmulationParameters.hpp.

Member Data Documentation

◆ m_data_file_name

std::string dunedaq::appmodel::StreamEmulationParameters::m_data_file_name
private

Definition at line 71 of file StreamEmulationParameters.hpp.

◆ m_frame_error_rate_hz

float dunedaq::appmodel::StreamEmulationParameters::m_frame_error_rate_hz
private

Definition at line 76 of file StreamEmulationParameters.hpp.

◆ m_generate_periodic_adc_pattern

bool dunedaq::appmodel::StreamEmulationParameters::m_generate_periodic_adc_pattern
private

Definition at line 77 of file StreamEmulationParameters.hpp.

◆ m_input_file_size_limit

uint32_t dunedaq::appmodel::StreamEmulationParameters::m_input_file_size_limit
private

Definition at line 73 of file StreamEmulationParameters.hpp.

◆ m_random_population_size

uint32_t dunedaq::appmodel::StreamEmulationParameters::m_random_population_size
private

Definition at line 75 of file StreamEmulationParameters.hpp.

◆ m_set_t0

bool dunedaq::appmodel::StreamEmulationParameters::m_set_t0
private

Definition at line 74 of file StreamEmulationParameters.hpp.

◆ m_tp_data_file_name

std::string dunedaq::appmodel::StreamEmulationParameters::m_tp_data_file_name
private

Definition at line 72 of file StreamEmulationParameters.hpp.

◆ m_TP_rate_per_channel

float dunedaq::appmodel::StreamEmulationParameters::m_TP_rate_per_channel
private

Definition at line 78 of file StreamEmulationParameters.hpp.

◆ s_class_name

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

The name of the configuration class.

Definition at line 37 of file StreamEmulationParameters.hpp.

◆ s_data_file_name

static const std::string dunedaq::appmodel::StreamEmulationParameters::s_data_file_name = "data_file_name"
inlinestatic

Definition at line 85 of file StreamEmulationParameters.hpp.

◆ s_frame_error_rate_hz

static const std::string dunedaq::appmodel::StreamEmulationParameters::s_frame_error_rate_hz = "frame_error_rate_hz"
inlinestatic

Definition at line 90 of file StreamEmulationParameters.hpp.

◆ s_generate_periodic_adc_pattern

static const std::string dunedaq::appmodel::StreamEmulationParameters::s_generate_periodic_adc_pattern = "generate_periodic_adc_pattern"
inlinestatic

Definition at line 91 of file StreamEmulationParameters.hpp.

◆ s_input_file_size_limit

static const std::string dunedaq::appmodel::StreamEmulationParameters::s_input_file_size_limit = "input_file_size_limit"
inlinestatic

Definition at line 87 of file StreamEmulationParameters.hpp.

◆ s_random_population_size

static const std::string dunedaq::appmodel::StreamEmulationParameters::s_random_population_size = "random_population_size"
inlinestatic

Definition at line 89 of file StreamEmulationParameters.hpp.

◆ s_set_t0

static const std::string dunedaq::appmodel::StreamEmulationParameters::s_set_t0 = "set_t0"
inlinestatic

Definition at line 88 of file StreamEmulationParameters.hpp.

◆ s_tp_data_file_name

static const std::string dunedaq::appmodel::StreamEmulationParameters::s_tp_data_file_name = "tp_data_file_name"
inlinestatic

Definition at line 86 of file StreamEmulationParameters.hpp.

◆ s_TP_rate_per_channel

static const std::string dunedaq::appmodel::StreamEmulationParameters::s_TP_rate_per_channel = "TP_rate_per_channel"
inlinestatic

Definition at line 92 of file StreamEmulationParameters.hpp.


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