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

#include <FakeHSIEventGeneratorConf.hpp>

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

Public Member Functions

virtual void print (unsigned int offset, bool print_header, std::ostream &s) const
 Print details of the FakeHSIEventGeneratorConf 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.
 
int64_t get_timestamp_offset () const
 Get "timestamp_offset" attribute value. Offset for HSIEvent timestamps in units of clock ticks. Positive offset increases timestamp estimate.
 
void set_timestamp_offset (int64_t value)
 Set "timestamp_offset" attribute value. Offset for HSIEvent timestamps in units of clock ticks. Positive offset increases timestamp estimate.
 
double get_trigger_rate () const
 Get "trigger_rate" attribute value. Trigger rate (in Hz) for the HSIEvent generation.
 
void set_trigger_rate (double value)
 Set "trigger_rate" attribute value. Trigger rate (in Hz) for the HSIEvent generation.
 
uint32_t get_hsi_device_id () const
 Get "hsi_device_id" attribute value. HSI device ID for emulated HSIEvent messages.
 
void set_hsi_device_id (uint32_t value)
 Set "hsi_device_id" attribute value. HSI device ID for emulated HSIEvent messages.
 
uint32_t get_mean_signal_multiplicity () const
 Get "mean_signal_multiplicity" attribute value. Mean number of edges expected per signal. Used when signal emulation mode is 1.
 
void set_mean_signal_multiplicity (uint32_t value)
 Set "mean_signal_multiplicity" attribute value. Mean number of edges expected per signal. Used when signal emulation mode is 1.
 
uint32_t get_enabled_signals () const
 Get "enabled_signals" attribute value. Which signals or bit of the 32 bit signal bit map are enabled, i.e. could produce an emulated signal.
 
void set_enabled_signals (uint32_t value)
 Set "enabled_signals" attribute value. Which signals or bit of the 32 bit signal bit map are enabled, i.e. could produce an emulated signal.
 
uint32_t get_signal_emulation_mode () const
 Get "signal_emulation_mode" attribute value. Signal bit map emulation mode. 0: enabled signals always on; 1: enabled signals are emulated (independently) on according to a Poisson with mean mean_signal_multiplicity; signal map generated with uniform distr. enabled signals only.
 
void set_signal_emulation_mode (uint32_t value)
 Set "signal_emulation_mode" attribute value. Signal bit map emulation mode. 0: enabled signals always on; 1: enabled signals are emulated (independently) on according to a Poisson with mean mean_signal_multiplicity; signal map generated with uniform distr. enabled signals only.
 
virtual void print (unsigned int offset, bool print_header, std::ostream &s) const
 Print details of the FakeHSIEventGeneratorConf 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.
 
int64_t get_timestamp_offset () const
 Get "timestamp_offset" attribute value. Offset for HSIEvent timestamps in units of clock ticks. Positive offset increases timestamp estimate.
 
void set_timestamp_offset (int64_t value)
 Set "timestamp_offset" attribute value. Offset for HSIEvent timestamps in units of clock ticks. Positive offset increases timestamp estimate.
 
double get_trigger_rate () const
 Get "trigger_rate" attribute value. Trigger rate (in Hz) for the HSIEvent generation.
 
void set_trigger_rate (double value)
 Set "trigger_rate" attribute value. Trigger rate (in Hz) for the HSIEvent generation.
 
uint32_t get_hsi_device_id () const
 Get "hsi_device_id" attribute value. HSI device ID for emulated HSIEvent messages.
 
void set_hsi_device_id (uint32_t value)
 Set "hsi_device_id" attribute value. HSI device ID for emulated HSIEvent messages.
 
uint32_t get_mean_signal_multiplicity () const
 Get "mean_signal_multiplicity" attribute value. Mean number of edges expected per signal. Used when signal emulation mode is 1.
 
void set_mean_signal_multiplicity (uint32_t value)
 Set "mean_signal_multiplicity" attribute value. Mean number of edges expected per signal. Used when signal emulation mode is 1.
 
uint32_t get_enabled_signals () const
 Get "enabled_signals" attribute value. Which signals or bit of the 32 bit signal bit map are enabled, i.e. could produce an emulated signal.
 
void set_enabled_signals (uint32_t value)
 Set "enabled_signals" attribute value. Which signals or bit of the 32 bit signal bit map are enabled, i.e. could produce an emulated signal.
 
uint32_t get_signal_emulation_mode () const
 Get "signal_emulation_mode" attribute value. Signal bit map emulation mode. 0: enabled signals always on; 1: enabled signals are emulated (independently) on according to a Poisson with mean mean_signal_multiplicity; signal map generated with uniform distr. enabled signals only.
 
void set_signal_emulation_mode (uint32_t value)
 Set "signal_emulation_mode" attribute value. Signal bit map emulation mode. 0: enabled signals always on; 1: enabled signals are emulated (independently) on according to a Poisson with mean mean_signal_multiplicity; signal map generated with uniform distr. enabled signals only.
 
- 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_timestamp_offset_str () noexcept
 
static const std::string & __get_trigger_rate_str () noexcept
 
static const std::string & __get_hsi_device_id_str () noexcept
 
static const std::string & __get_mean_signal_multiplicity_str () noexcept
 
static const std::string & __get_enabled_signals_str () noexcept
 
static const std::string & __get_signal_emulation_mode_str () noexcept
 
static const std::string & __get_timestamp_offset_str () noexcept
 
static const std::string & __get_trigger_rate_str () noexcept
 
static const std::string & __get_hsi_device_id_str () noexcept
 
static const std::string & __get_mean_signal_multiplicity_str () noexcept
 
static const std::string & __get_enabled_signals_str () noexcept
 
static const std::string & __get_signal_emulation_mode_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_timestamp_offset = "timestamp_offset"
 
static const std::string s_trigger_rate = "trigger_rate"
 
static const std::string s_hsi_device_id = "hsi_device_id"
 
static const std::string s_mean_signal_multiplicity = "mean_signal_multiplicity"
 
static const std::string s_enabled_signals = "enabled_signals"
 
static const std::string s_signal_emulation_mode = "signal_emulation_mode"
 

Protected Member Functions

 FakeHSIEventGeneratorConf (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~FakeHSIEventGeneratorConf () 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
 
 FakeHSIEventGeneratorConf (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~FakeHSIEventGeneratorConf () 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

int64_t m_timestamp_offset
 
double m_trigger_rate
 
uint32_t m_hsi_device_id
 
uint32_t m_mean_signal_multiplicity
 
uint32_t m_enabled_signals
 
uint32_t m_signal_emulation_mode
 

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 FakeHSIEventGeneratorConf.hpp.

Constructor & Destructor Documentation

◆ FakeHSIEventGeneratorConf() [1/2]

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

Definition at line 26 of file FakeHSIEventGeneratorConf.cpp.

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

◆ ~FakeHSIEventGeneratorConf() [1/2]

dunedaq::appmodel::FakeHSIEventGeneratorConf::~FakeHSIEventGeneratorConf ( )
protectedvirtualnoexcept

Definition at line 78 of file FakeHSIEventGeneratorConf.cpp.

79 {
80 }

◆ FakeHSIEventGeneratorConf() [2/2]

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

◆ ~FakeHSIEventGeneratorConf() [2/2]

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

Member Function Documentation

◆ __get_enabled_signals_str() [1/2]

static const std::string & dunedaq::appmodel::FakeHSIEventGeneratorConf::__get_enabled_signals_str ( )
inlinestaticnoexcept

Definition at line 94 of file FakeHSIEventGeneratorConf.hpp.

◆ __get_enabled_signals_str() [2/2]

static const std::string & dunedaq::appmodel::FakeHSIEventGeneratorConf::__get_enabled_signals_str ( )
inlinestaticnoexcept

Definition at line 94 of file FakeHSIEventGeneratorConf.hpp.

94{ return s_enabled_signals; }

◆ __get_hsi_device_id_str() [1/2]

static const std::string & dunedaq::appmodel::FakeHSIEventGeneratorConf::__get_hsi_device_id_str ( )
inlinestaticnoexcept

Definition at line 92 of file FakeHSIEventGeneratorConf.hpp.

◆ __get_hsi_device_id_str() [2/2]

static const std::string & dunedaq::appmodel::FakeHSIEventGeneratorConf::__get_hsi_device_id_str ( )
inlinestaticnoexcept

Definition at line 92 of file FakeHSIEventGeneratorConf.hpp.

92{ return s_hsi_device_id; }

◆ __get_mean_signal_multiplicity_str() [1/2]

static const std::string & dunedaq::appmodel::FakeHSIEventGeneratorConf::__get_mean_signal_multiplicity_str ( )
inlinestaticnoexcept

Definition at line 93 of file FakeHSIEventGeneratorConf.hpp.

◆ __get_mean_signal_multiplicity_str() [2/2]

static const std::string & dunedaq::appmodel::FakeHSIEventGeneratorConf::__get_mean_signal_multiplicity_str ( )
inlinestaticnoexcept

Definition at line 93 of file FakeHSIEventGeneratorConf.hpp.

◆ __get_signal_emulation_mode_str() [1/2]

static const std::string & dunedaq::appmodel::FakeHSIEventGeneratorConf::__get_signal_emulation_mode_str ( )
inlinestaticnoexcept

Definition at line 95 of file FakeHSIEventGeneratorConf.hpp.

◆ __get_signal_emulation_mode_str() [2/2]

static const std::string & dunedaq::appmodel::FakeHSIEventGeneratorConf::__get_signal_emulation_mode_str ( )
inlinestaticnoexcept

Definition at line 95 of file FakeHSIEventGeneratorConf.hpp.

◆ __get_timestamp_offset_str() [1/2]

static const std::string & dunedaq::appmodel::FakeHSIEventGeneratorConf::__get_timestamp_offset_str ( )
inlinestaticnoexcept

Definition at line 90 of file FakeHSIEventGeneratorConf.hpp.

◆ __get_timestamp_offset_str() [2/2]

static const std::string & dunedaq::appmodel::FakeHSIEventGeneratorConf::__get_timestamp_offset_str ( )
inlinestaticnoexcept

Definition at line 90 of file FakeHSIEventGeneratorConf.hpp.

90{ return s_timestamp_offset; }

◆ __get_trigger_rate_str() [1/2]

static const std::string & dunedaq::appmodel::FakeHSIEventGeneratorConf::__get_trigger_rate_str ( )
inlinestaticnoexcept

Definition at line 91 of file FakeHSIEventGeneratorConf.hpp.

◆ __get_trigger_rate_str() [2/2]

static const std::string & dunedaq::appmodel::FakeHSIEventGeneratorConf::__get_trigger_rate_str ( )
inlinestaticnoexcept

Definition at line 91 of file FakeHSIEventGeneratorConf.hpp.

91{ return s_trigger_rate; }

◆ get() [1/4]

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

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

Definition at line 92 of file FakeHSIEventGeneratorConf.cpp.

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

◆ get_enabled_signals() [1/2]

uint32_t dunedaq::appmodel::FakeHSIEventGeneratorConf::get_enabled_signals ( ) const
inline

Get "enabled_signals" attribute value. Which signals or bit of the 32 bit signal bit map are enabled, i.e. could produce an emulated signal.

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

Definition at line 238 of file FakeHSIEventGeneratorConf.hpp.

239 {
240 std::lock_guard scoped_lock(m_mutex);
241 check();
242 check_init();
243 return m_enabled_signals;
244 }

◆ get_enabled_signals() [2/2]

uint32_t dunedaq::appmodel::FakeHSIEventGeneratorConf::get_enabled_signals ( ) const
inline

Get "enabled_signals" attribute value. Which signals or bit of the 32 bit signal bit map are enabled, i.e. could produce an emulated signal.

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

Definition at line 238 of file FakeHSIEventGeneratorConf.hpp.

239 {
240 std::lock_guard scoped_lock(m_mutex);
241 check();
242 check_init();
243 return m_enabled_signals;
244 }

◆ get_hsi_device_id() [1/2]

uint32_t dunedaq::appmodel::FakeHSIEventGeneratorConf::get_hsi_device_id ( ) const
inline

Get "hsi_device_id" attribute value. HSI device ID for emulated HSIEvent messages.

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

Definition at line 172 of file FakeHSIEventGeneratorConf.hpp.

173 {
174 std::lock_guard scoped_lock(m_mutex);
175 check();
176 check_init();
177 return m_hsi_device_id;
178 }

◆ get_hsi_device_id() [2/2]

uint32_t dunedaq::appmodel::FakeHSIEventGeneratorConf::get_hsi_device_id ( ) const
inline

Get "hsi_device_id" attribute value. HSI device ID for emulated HSIEvent messages.

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

Definition at line 172 of file FakeHSIEventGeneratorConf.hpp.

173 {
174 std::lock_guard scoped_lock(m_mutex);
175 check();
176 check_init();
177 return m_hsi_device_id;
178 }

◆ get_mean_signal_multiplicity() [1/2]

uint32_t dunedaq::appmodel::FakeHSIEventGeneratorConf::get_mean_signal_multiplicity ( ) const
inline

Get "mean_signal_multiplicity" attribute value. Mean number of edges expected per signal. Used when signal emulation mode is 1.

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

Definition at line 205 of file FakeHSIEventGeneratorConf.hpp.

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

◆ get_mean_signal_multiplicity() [2/2]

uint32_t dunedaq::appmodel::FakeHSIEventGeneratorConf::get_mean_signal_multiplicity ( ) const
inline

Get "mean_signal_multiplicity" attribute value. Mean number of edges expected per signal. Used when signal emulation mode is 1.

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

Definition at line 205 of file FakeHSIEventGeneratorConf.hpp.

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

◆ get_signal_emulation_mode() [1/2]

uint32_t dunedaq::appmodel::FakeHSIEventGeneratorConf::get_signal_emulation_mode ( ) const
inline

Get "signal_emulation_mode" attribute value. Signal bit map emulation mode. 0: enabled signals always on; 1: enabled signals are emulated (independently) on according to a Poisson with mean mean_signal_multiplicity; signal map generated with uniform distr. enabled signals only.

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

Definition at line 271 of file FakeHSIEventGeneratorConf.hpp.

272 {
273 std::lock_guard scoped_lock(m_mutex);
274 check();
275 check_init();
277 }

◆ get_signal_emulation_mode() [2/2]

uint32_t dunedaq::appmodel::FakeHSIEventGeneratorConf::get_signal_emulation_mode ( ) const
inline

Get "signal_emulation_mode" attribute value. Signal bit map emulation mode. 0: enabled signals always on; 1: enabled signals are emulated (independently) on according to a Poisson with mean mean_signal_multiplicity; signal map generated with uniform distr. enabled signals only.

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

Definition at line 271 of file FakeHSIEventGeneratorConf.hpp.

272 {
273 std::lock_guard scoped_lock(m_mutex);
274 check();
275 check_init();
277 }

◆ get_timestamp_offset() [1/2]

int64_t dunedaq::appmodel::FakeHSIEventGeneratorConf::get_timestamp_offset ( ) const
inline

Get "timestamp_offset" attribute value. Offset for HSIEvent timestamps in units of clock ticks. Positive offset increases timestamp estimate.

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

Definition at line 106 of file FakeHSIEventGeneratorConf.hpp.

107 {
108 std::lock_guard scoped_lock(m_mutex);
109 check();
110 check_init();
111 return m_timestamp_offset;
112 }

◆ get_timestamp_offset() [2/2]

int64_t dunedaq::appmodel::FakeHSIEventGeneratorConf::get_timestamp_offset ( ) const
inline

Get "timestamp_offset" attribute value. Offset for HSIEvent timestamps in units of clock ticks. Positive offset increases timestamp estimate.

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

Definition at line 106 of file FakeHSIEventGeneratorConf.hpp.

107 {
108 std::lock_guard scoped_lock(m_mutex);
109 check();
110 check_init();
111 return m_timestamp_offset;
112 }

◆ get_trigger_rate() [1/2]

double dunedaq::appmodel::FakeHSIEventGeneratorConf::get_trigger_rate ( ) const
inline

Get "trigger_rate" attribute value. Trigger rate (in Hz) for the HSIEvent generation.

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

Definition at line 139 of file FakeHSIEventGeneratorConf.hpp.

140 {
141 std::lock_guard scoped_lock(m_mutex);
142 check();
143 check_init();
144 return m_trigger_rate;
145 }

◆ get_trigger_rate() [2/2]

double dunedaq::appmodel::FakeHSIEventGeneratorConf::get_trigger_rate ( ) const
inline

Get "trigger_rate" attribute value. Trigger rate (in Hz) for the HSIEvent generation.

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

Definition at line 139 of file FakeHSIEventGeneratorConf.hpp.

140 {
141 std::lock_guard scoped_lock(m_mutex);
142 check();
143 check_init();
144 return m_trigger_rate;
145 }

◆ init() [1/2]

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

60 {
61 p_was_read = true;
63 TLOG_DEBUG(5) << "read object " << this << " (class " << s_class_name << ')';
64
65 try {
72 }
73 catch (dunedaq::conffwk::Exception & ex) {
74 throw_init_ex(ex);
75 }
76 }
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::FakeHSIEventGeneratorConf::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::FakeHSIEventGeneratorConf::print ( unsigned int offset,
bool print_header,
std::ostream & s ) const
virtual

Print details of the FakeHSIEventGeneratorConf 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 FakeHSIEventGeneratorConf.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
52 }
53 catch (dunedaq::conffwk::Exception & ex) {
55 }
56 }
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::FakeHSIEventGeneratorConf::print ( unsigned int offset,
bool print_header,
std::ostream & s ) const
virtual

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

void dunedaq::appmodel::FakeHSIEventGeneratorConf::set_enabled_signals ( uint32_t value)
inline

Set "enabled_signals" attribute value. Which signals or bit of the 32 bit signal bit map are enabled, i.e. could produce an emulated signal.

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

Definition at line 254 of file FakeHSIEventGeneratorConf.hpp.

255 {
256 std::lock_guard scoped_lock(m_mutex);
257 check();
258 clear();
260 }
void set_by_val(const std::string &name, T value)
Set attribute value.

◆ set_enabled_signals() [2/2]

void dunedaq::appmodel::FakeHSIEventGeneratorConf::set_enabled_signals ( uint32_t value)
inline

Set "enabled_signals" attribute value. Which signals or bit of the 32 bit signal bit map are enabled, i.e. could produce an emulated signal.

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

Definition at line 254 of file FakeHSIEventGeneratorConf.hpp.

255 {
256 std::lock_guard scoped_lock(m_mutex);
257 check();
258 clear();
260 }

◆ set_hsi_device_id() [1/2]

void dunedaq::appmodel::FakeHSIEventGeneratorConf::set_hsi_device_id ( uint32_t value)
inline

Set "hsi_device_id" attribute value. HSI device ID for emulated HSIEvent messages.

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

Definition at line 188 of file FakeHSIEventGeneratorConf.hpp.

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

◆ set_hsi_device_id() [2/2]

void dunedaq::appmodel::FakeHSIEventGeneratorConf::set_hsi_device_id ( uint32_t value)
inline

Set "hsi_device_id" attribute value. HSI device ID for emulated HSIEvent messages.

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

Definition at line 188 of file FakeHSIEventGeneratorConf.hpp.

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

◆ set_mean_signal_multiplicity() [1/2]

void dunedaq::appmodel::FakeHSIEventGeneratorConf::set_mean_signal_multiplicity ( uint32_t value)
inline

Set "mean_signal_multiplicity" attribute value. Mean number of edges expected per signal. Used when signal emulation mode is 1.

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

Definition at line 221 of file FakeHSIEventGeneratorConf.hpp.

222 {
223 std::lock_guard scoped_lock(m_mutex);
224 check();
225 clear();
227 }

◆ set_mean_signal_multiplicity() [2/2]

void dunedaq::appmodel::FakeHSIEventGeneratorConf::set_mean_signal_multiplicity ( uint32_t value)
inline

Set "mean_signal_multiplicity" attribute value. Mean number of edges expected per signal. Used when signal emulation mode is 1.

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

Definition at line 221 of file FakeHSIEventGeneratorConf.hpp.

222 {
223 std::lock_guard scoped_lock(m_mutex);
224 check();
225 clear();
227 }

◆ set_signal_emulation_mode() [1/2]

void dunedaq::appmodel::FakeHSIEventGeneratorConf::set_signal_emulation_mode ( uint32_t value)
inline

Set "signal_emulation_mode" attribute value. Signal bit map emulation mode. 0: enabled signals always on; 1: enabled signals are emulated (independently) on according to a Poisson with mean mean_signal_multiplicity; signal map generated with uniform distr. enabled signals only.

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

Definition at line 287 of file FakeHSIEventGeneratorConf.hpp.

288 {
289 std::lock_guard scoped_lock(m_mutex);
290 check();
291 clear();
293 }

◆ set_signal_emulation_mode() [2/2]

void dunedaq::appmodel::FakeHSIEventGeneratorConf::set_signal_emulation_mode ( uint32_t value)
inline

Set "signal_emulation_mode" attribute value. Signal bit map emulation mode. 0: enabled signals always on; 1: enabled signals are emulated (independently) on according to a Poisson with mean mean_signal_multiplicity; signal map generated with uniform distr. enabled signals only.

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

Definition at line 287 of file FakeHSIEventGeneratorConf.hpp.

288 {
289 std::lock_guard scoped_lock(m_mutex);
290 check();
291 clear();
293 }

◆ set_timestamp_offset() [1/2]

void dunedaq::appmodel::FakeHSIEventGeneratorConf::set_timestamp_offset ( int64_t value)
inline

Set "timestamp_offset" attribute value. Offset for HSIEvent timestamps in units of clock ticks. Positive offset increases timestamp estimate.

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

Definition at line 122 of file FakeHSIEventGeneratorConf.hpp.

123 {
124 std::lock_guard scoped_lock(m_mutex);
125 check();
126 clear();
128 }

◆ set_timestamp_offset() [2/2]

void dunedaq::appmodel::FakeHSIEventGeneratorConf::set_timestamp_offset ( int64_t value)
inline

Set "timestamp_offset" attribute value. Offset for HSIEvent timestamps in units of clock ticks. Positive offset increases timestamp estimate.

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

Definition at line 122 of file FakeHSIEventGeneratorConf.hpp.

123 {
124 std::lock_guard scoped_lock(m_mutex);
125 check();
126 clear();
128 }

◆ set_trigger_rate() [1/2]

void dunedaq::appmodel::FakeHSIEventGeneratorConf::set_trigger_rate ( double value)
inline

Set "trigger_rate" attribute value. Trigger rate (in Hz) for the HSIEvent generation.

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

Definition at line 155 of file FakeHSIEventGeneratorConf.hpp.

156 {
157 std::lock_guard scoped_lock(m_mutex);
158 check();
159 clear();
161 }

◆ set_trigger_rate() [2/2]

void dunedaq::appmodel::FakeHSIEventGeneratorConf::set_trigger_rate ( double value)
inline

Set "trigger_rate" attribute value. Trigger rate (in Hz) for the HSIEvent generation.

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

Definition at line 155 of file FakeHSIEventGeneratorConf.hpp.

156 {
157 std::lock_guard scoped_lock(m_mutex);
158 check();
159 clear();
161 }

Friends And Related Symbol Documentation

◆ conffwk::Configuration

Definition at line 22 of file FakeHSIEventGeneratorConf.hpp.

◆ conffwk::DalFactory

conffwk::DalFactory
friend

Definition at line 24 of file FakeHSIEventGeneratorConf.hpp.

◆ conffwk::DalObject

Definition at line 23 of file FakeHSIEventGeneratorConf.hpp.

◆ conffwk::DalRegistry

Definition at line 25 of file FakeHSIEventGeneratorConf.hpp.

Member Data Documentation

◆ m_enabled_signals

uint32_t dunedaq::appmodel::FakeHSIEventGeneratorConf::m_enabled_signals
private

Definition at line 75 of file FakeHSIEventGeneratorConf.hpp.

◆ m_hsi_device_id

uint32_t dunedaq::appmodel::FakeHSIEventGeneratorConf::m_hsi_device_id
private

Definition at line 73 of file FakeHSIEventGeneratorConf.hpp.

◆ m_mean_signal_multiplicity

uint32_t dunedaq::appmodel::FakeHSIEventGeneratorConf::m_mean_signal_multiplicity
private

Definition at line 74 of file FakeHSIEventGeneratorConf.hpp.

◆ m_signal_emulation_mode

uint32_t dunedaq::appmodel::FakeHSIEventGeneratorConf::m_signal_emulation_mode
private

Definition at line 76 of file FakeHSIEventGeneratorConf.hpp.

◆ m_timestamp_offset

int64_t dunedaq::appmodel::FakeHSIEventGeneratorConf::m_timestamp_offset
private

Definition at line 71 of file FakeHSIEventGeneratorConf.hpp.

◆ m_trigger_rate

double dunedaq::appmodel::FakeHSIEventGeneratorConf::m_trigger_rate
private

Definition at line 72 of file FakeHSIEventGeneratorConf.hpp.

◆ s_class_name

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

The name of the configuration class.

Definition at line 37 of file FakeHSIEventGeneratorConf.hpp.

◆ s_enabled_signals

static const std::string dunedaq::appmodel::FakeHSIEventGeneratorConf::s_enabled_signals = "enabled_signals"
inlinestatic

Definition at line 87 of file FakeHSIEventGeneratorConf.hpp.

◆ s_hsi_device_id

static const std::string dunedaq::appmodel::FakeHSIEventGeneratorConf::s_hsi_device_id = "hsi_device_id"
inlinestatic

Definition at line 85 of file FakeHSIEventGeneratorConf.hpp.

◆ s_mean_signal_multiplicity

static const std::string dunedaq::appmodel::FakeHSIEventGeneratorConf::s_mean_signal_multiplicity = "mean_signal_multiplicity"
inlinestatic

Definition at line 86 of file FakeHSIEventGeneratorConf.hpp.

◆ s_signal_emulation_mode

static const std::string dunedaq::appmodel::FakeHSIEventGeneratorConf::s_signal_emulation_mode = "signal_emulation_mode"
inlinestatic

Definition at line 88 of file FakeHSIEventGeneratorConf.hpp.

◆ s_timestamp_offset

static const std::string dunedaq::appmodel::FakeHSIEventGeneratorConf::s_timestamp_offset = "timestamp_offset"
inlinestatic

Definition at line 83 of file FakeHSIEventGeneratorConf.hpp.

◆ s_trigger_rate

static const std::string dunedaq::appmodel::FakeHSIEventGeneratorConf::s_trigger_rate = "trigger_rate"
inlinestatic

Definition at line 84 of file FakeHSIEventGeneratorConf.hpp.


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