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

#include <RandomTCMakerConf.hpp>

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

Classes

struct  Time_distribution
 

Public Member Functions

virtual void print (unsigned int offset, bool print_header, std::ostream &s) const
 Print details of the RandomTCMakerConf 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.
 
float get_trigger_rate_hz () const
 Get "trigger_rate_hz" attribute value. Trigger rate (in Hz) for the RandomTCMaker to produce the TCs.
 
void set_trigger_rate_hz (float value)
 Set "trigger_rate_hz" attribute value. Trigger rate (in Hz) for the RandomTCMaker to produce the TCs.
 
const std::string & get_time_distribution () const
 Get "time_distribution" attribute value. Type of distribution used for random timestamps (uniform or poisson)
 
void set_time_distribution (const std::string &value)
 Set "time_distribution" attribute value. Type of distribution used for random timestamps (uniform or poisson)
 
const std::string & get_candidate_type_name () const
 Get "candidate_type_name" attribute value. Enumerator name of the TC type, e.g. kTiming.
 
void set_candidate_type_name (const std::string &value)
 Set "candidate_type_name" attribute value. Enumerator name of the TC type, e.g. kTiming.
 
int64_t get_candidate_backshift_ts () const
 Get "candidate_backshift_ts" attribute value. Time backshift applied to the TC central time at the creation of the TC.
 
void set_candidate_backshift_ts (int64_t value)
 Set "candidate_backshift_ts" attribute value. Time backshift applied to the TC central time at the creation of the TC.
 
uint32_t get_candidate_window_before_ts () const
 Get "candidate_window_before_ts" attribute value. Candidate extension before its central time.
 
void set_candidate_window_before_ts (uint32_t value)
 Set "candidate_window_before_ts" attribute value. Candidate extension before its central time.
 
uint32_t get_candidate_window_after_ts () const
 Get "candidate_window_after_ts" attribute value. Candidate extension after its central time.
 
void set_candidate_window_after_ts (uint32_t value)
 Set "candidate_window_after_ts" attribute value. Candidate extension after its central time.
 
virtual void print (unsigned int offset, bool print_header, std::ostream &s) const
 Print details of the RandomTCMakerConf 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.
 
float get_trigger_rate_hz () const
 Get "trigger_rate_hz" attribute value. Trigger rate (in Hz) for the RandomTCMaker to produce the TCs.
 
void set_trigger_rate_hz (float value)
 Set "trigger_rate_hz" attribute value. Trigger rate (in Hz) for the RandomTCMaker to produce the TCs.
 
const std::string & get_time_distribution () const
 Get "time_distribution" attribute value. Type of distribution used for random timestamps (uniform or poisson)
 
void set_time_distribution (const std::string &value)
 Set "time_distribution" attribute value. Type of distribution used for random timestamps (uniform or poisson)
 
const std::string & get_candidate_type_name () const
 Get "candidate_type_name" attribute value. Enumerator name of the TC type, e.g. kTiming.
 
void set_candidate_type_name (const std::string &value)
 Set "candidate_type_name" attribute value. Enumerator name of the TC type, e.g. kTiming.
 
int64_t get_candidate_backshift_ts () const
 Get "candidate_backshift_ts" attribute value. Time backshift applied to the TC central time at the creation of the TC.
 
void set_candidate_backshift_ts (int64_t value)
 Set "candidate_backshift_ts" attribute value. Time backshift applied to the TC central time at the creation of the TC.
 
uint32_t get_candidate_window_before_ts () const
 Get "candidate_window_before_ts" attribute value. Candidate extension before its central time.
 
void set_candidate_window_before_ts (uint32_t value)
 Set "candidate_window_before_ts" attribute value. Candidate extension before its central time.
 
uint32_t get_candidate_window_after_ts () const
 Get "candidate_window_after_ts" attribute value. Candidate extension after its central time.
 
void set_candidate_window_after_ts (uint32_t value)
 Set "candidate_window_after_ts" attribute value. Candidate extension after its central time.
 
- Public Member Functions inherited from dunedaq::appmodel::StandaloneTCMakerConf
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_timestamp_method () const
 Get "timestamp_method" attribute value. Option to pick source for timing (system / timesync)
 
void set_timestamp_method (const std::string &value)
 Set "timestamp_method" attribute value. Option to pick source for timing (system / timesync)
 
bool get_latency_monitoring () const
 Get "latency_monitoring" attribute value. Should we monitor latency in Grafana?
 
void set_latency_monitoring (bool value)
 Set "latency_monitoring" attribute value. Should we monitor latency in Grafana?
 
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_timestamp_method () const
 Get "timestamp_method" attribute value. Option to pick source for timing (system / timesync)
 
void set_timestamp_method (const std::string &value)
 Set "timestamp_method" attribute value. Option to pick source for timing (system / timesync)
 
bool get_latency_monitoring () const
 Get "latency_monitoring" attribute value. Should we monitor latency in Grafana?
 
void set_latency_monitoring (bool value)
 Set "latency_monitoring" attribute value. Should we monitor latency in Grafana?
 
- 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_trigger_rate_hz_str () noexcept
 
static const std::string & __get_time_distribution_str () noexcept
 
static const std::string & __get_candidate_type_name_str () noexcept
 
static const std::string & __get_candidate_backshift_ts_str () noexcept
 
static const std::string & __get_candidate_window_before_ts_str () noexcept
 
static const std::string & __get_candidate_window_after_ts_str () noexcept
 
static const std::string & __get_template_for_str () noexcept
 
static const std::string & __get_trigger_rate_hz_str () noexcept
 
static const std::string & __get_time_distribution_str () noexcept
 
static const std::string & __get_candidate_type_name_str () noexcept
 
static const std::string & __get_candidate_backshift_ts_str () noexcept
 
static const std::string & __get_candidate_window_before_ts_str () noexcept
 
static const std::string & __get_candidate_window_after_ts_str () noexcept
 
- Static Public Member Functions inherited from dunedaq::appmodel::StandaloneTCMakerConf
static const std::string & __get_template_for_str () noexcept
 
static const std::string & __get_timestamp_method_str () noexcept
 
static const std::string & __get_latency_monitoring_str () noexcept
 
static const std::string & __get_template_for_str () noexcept
 
static const std::string & __get_timestamp_method_str () noexcept
 
static const std::string & __get_latency_monitoring_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_trigger_rate_hz = "trigger_rate_hz"
 
static const std::string s_time_distribution = "time_distribution"
 
static const std::string s_candidate_type_name = "candidate_type_name"
 
static const std::string s_candidate_backshift_ts = "candidate_backshift_ts"
 
static const std::string s_candidate_window_before_ts = "candidate_window_before_ts"
 
static const std::string s_candidate_window_after_ts = "candidate_window_after_ts"
 
- Static Public Attributes inherited from dunedaq::appmodel::StandaloneTCMakerConf
static const std::string & s_class_name
 
static const std::string s_template_for = "template_for"
 
static const std::string s_timestamp_method = "timestamp_method"
 
static const std::string s_latency_monitoring = "latency_monitoring"
 

Protected Member Functions

 RandomTCMakerConf (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~RandomTCMakerConf () 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
 
 RandomTCMakerConf (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~RandomTCMakerConf () 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::appmodel::StandaloneTCMakerConf
 StandaloneTCMakerConf (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~StandaloneTCMakerConf () noexcept
 
bool get (const std::string &name, std::vector< const dunedaq::conffwk::DalObject * > &vec, bool upcast_unregistered, bool first_call) const
 
 StandaloneTCMakerConf (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~StandaloneTCMakerConf () noexcept
 
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
 
float m_trigger_rate_hz
 
std::string m_time_distribution
 
std::string m_candidate_type_name
 
int64_t m_candidate_backshift_ts
 
uint32_t m_candidate_window_before_ts
 
uint32_t m_candidate_window_after_ts
 

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 23 of file RandomTCMakerConf.hpp.

Constructor & Destructor Documentation

◆ RandomTCMakerConf() [1/2]

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

Definition at line 26 of file RandomTCMakerConf.cpp.

26 :
29
30 {
31 ;
32 }
StandaloneTCMakerConf(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
The base class for any generated DAL object.
Definition DalObject.hpp:45

◆ ~RandomTCMakerConf() [1/2]

dunedaq::appmodel::RandomTCMakerConf::~RandomTCMakerConf ( )
protectedvirtualnoexcept

Definition at line 87 of file RandomTCMakerConf.cpp.

88 {
89 }

◆ RandomTCMakerConf() [2/2]

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

◆ ~RandomTCMakerConf() [2/2]

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

Member Function Documentation

◆ __get_candidate_backshift_ts_str() [1/2]

static const std::string & dunedaq::appmodel::RandomTCMakerConf::__get_candidate_backshift_ts_str ( )
inlinestaticnoexcept

Definition at line 99 of file RandomTCMakerConf.hpp.

static const std::string s_candidate_backshift_ts

◆ __get_candidate_backshift_ts_str() [2/2]

static const std::string & dunedaq::appmodel::RandomTCMakerConf::__get_candidate_backshift_ts_str ( )
inlinestaticnoexcept

Definition at line 99 of file RandomTCMakerConf.hpp.

◆ __get_candidate_type_name_str() [1/2]

static const std::string & dunedaq::appmodel::RandomTCMakerConf::__get_candidate_type_name_str ( )
inlinestaticnoexcept

Definition at line 98 of file RandomTCMakerConf.hpp.

98{ return s_candidate_type_name; }
static const std::string s_candidate_type_name

◆ __get_candidate_type_name_str() [2/2]

static const std::string & dunedaq::appmodel::RandomTCMakerConf::__get_candidate_type_name_str ( )
inlinestaticnoexcept

Definition at line 98 of file RandomTCMakerConf.hpp.

98{ return s_candidate_type_name; }

◆ __get_candidate_window_after_ts_str() [1/2]

static const std::string & dunedaq::appmodel::RandomTCMakerConf::__get_candidate_window_after_ts_str ( )
inlinestaticnoexcept

Definition at line 101 of file RandomTCMakerConf.hpp.

static const std::string s_candidate_window_after_ts

◆ __get_candidate_window_after_ts_str() [2/2]

static const std::string & dunedaq::appmodel::RandomTCMakerConf::__get_candidate_window_after_ts_str ( )
inlinestaticnoexcept

Definition at line 101 of file RandomTCMakerConf.hpp.

◆ __get_candidate_window_before_ts_str() [1/2]

static const std::string & dunedaq::appmodel::RandomTCMakerConf::__get_candidate_window_before_ts_str ( )
inlinestaticnoexcept

Definition at line 100 of file RandomTCMakerConf.hpp.

static const std::string s_candidate_window_before_ts

◆ __get_candidate_window_before_ts_str() [2/2]

static const std::string & dunedaq::appmodel::RandomTCMakerConf::__get_candidate_window_before_ts_str ( )
inlinestaticnoexcept

Definition at line 100 of file RandomTCMakerConf.hpp.

◆ __get_template_for_str() [1/2]

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

Definition at line 95 of file RandomTCMakerConf.hpp.

95{ return s_template_for; }

◆ __get_template_for_str() [2/2]

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

Definition at line 95 of file RandomTCMakerConf.hpp.

95{ return s_template_for; }

◆ __get_time_distribution_str() [1/2]

static const std::string & dunedaq::appmodel::RandomTCMakerConf::__get_time_distribution_str ( )
inlinestaticnoexcept

Definition at line 97 of file RandomTCMakerConf.hpp.

97{ return s_time_distribution; }
static const std::string s_time_distribution

◆ __get_time_distribution_str() [2/2]

static const std::string & dunedaq::appmodel::RandomTCMakerConf::__get_time_distribution_str ( )
inlinestaticnoexcept

Definition at line 97 of file RandomTCMakerConf.hpp.

97{ return s_time_distribution; }

◆ __get_trigger_rate_hz_str() [1/2]

static const std::string & dunedaq::appmodel::RandomTCMakerConf::__get_trigger_rate_hz_str ( )
inlinestaticnoexcept

Definition at line 96 of file RandomTCMakerConf.hpp.

96{ return s_trigger_rate_hz; }
static const std::string s_trigger_rate_hz

◆ __get_trigger_rate_hz_str() [2/2]

static const std::string & dunedaq::appmodel::RandomTCMakerConf::__get_trigger_rate_hz_str ( )
inlinestaticnoexcept

Definition at line 96 of file RandomTCMakerConf.hpp.

96{ return s_trigger_rate_hz; }

◆ get() [1/4]

std::vector< const dunedaq::conffwk::DalObject * > dunedaq::appmodel::RandomTCMakerConf::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

Reimplemented from dunedaq::appmodel::StandaloneTCMakerConf.

Definition at line 91 of file RandomTCMakerConf.cpp.

92 {
93 std::vector<const dunedaq::conffwk::DalObject *> vec;
94
95 if (!get(name, vec, upcast_unregistered, true))
96 throw_get_ex(name, s_class_name, this);
97
98 return vec;
99 }
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::RandomTCMakerConf::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

Reimplemented from dunedaq::appmodel::StandaloneTCMakerConf.

◆ get() [3/4]

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

Definition at line 101 of file RandomTCMakerConf.cpp.

102 {
103 if (first_call)
104 {
105 std::lock_guard scoped_lock(m_mutex);
106
107 check();
108 check_init();
109
110 if (get_rel_objects(name, upcast_unregistered, vec))
111 return true;
112 }
113
114 if (StandaloneTCMakerConf::get(name, vec, upcast_unregistered, false)) return true;
115
116 if (first_call)
117 return get_algo_objects(name, vec);
118
119 return false;
120 }
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...
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::RandomTCMakerConf::get ( const std::string & name,
std::vector< const dunedaq::conffwk::DalObject * > & vec,
bool upcast_unregistered,
bool first_call ) const
protected

◆ get_candidate_backshift_ts() [1/2]

int64_t dunedaq::appmodel::RandomTCMakerConf::get_candidate_backshift_ts ( ) const
inline

Get "candidate_backshift_ts" attribute value. Time backshift applied to the TC central time at the creation of the TC.

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

Definition at line 251 of file RandomTCMakerConf.hpp.

252 {
253 std::lock_guard scoped_lock(m_mutex);
254 check();
255 check_init();
257 }

◆ get_candidate_backshift_ts() [2/2]

int64_t dunedaq::appmodel::RandomTCMakerConf::get_candidate_backshift_ts ( ) const
inline

Get "candidate_backshift_ts" attribute value. Time backshift applied to the TC central time at the creation of the TC.

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

Definition at line 251 of file RandomTCMakerConf.hpp.

252 {
253 std::lock_guard scoped_lock(m_mutex);
254 check();
255 check_init();
257 }

◆ get_candidate_type_name() [1/2]

const std::string & dunedaq::appmodel::RandomTCMakerConf::get_candidate_type_name ( ) const
inline

Get "candidate_type_name" attribute value. Enumerator name of the TC type, e.g. kTiming.

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

Definition at line 218 of file RandomTCMakerConf.hpp.

219 {
220 std::lock_guard scoped_lock(m_mutex);
221 check();
222 check_init();
224 }

◆ get_candidate_type_name() [2/2]

const std::string & dunedaq::appmodel::RandomTCMakerConf::get_candidate_type_name ( ) const
inline

Get "candidate_type_name" attribute value. Enumerator name of the TC type, e.g. kTiming.

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

Definition at line 218 of file RandomTCMakerConf.hpp.

219 {
220 std::lock_guard scoped_lock(m_mutex);
221 check();
222 check_init();
224 }

◆ get_candidate_window_after_ts() [1/2]

uint32_t dunedaq::appmodel::RandomTCMakerConf::get_candidate_window_after_ts ( ) const
inline

Get "candidate_window_after_ts" attribute value. Candidate extension after its central time.

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

Definition at line 317 of file RandomTCMakerConf.hpp.

318 {
319 std::lock_guard scoped_lock(m_mutex);
320 check();
321 check_init();
323 }

◆ get_candidate_window_after_ts() [2/2]

uint32_t dunedaq::appmodel::RandomTCMakerConf::get_candidate_window_after_ts ( ) const
inline

Get "candidate_window_after_ts" attribute value. Candidate extension after its central time.

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

Definition at line 317 of file RandomTCMakerConf.hpp.

318 {
319 std::lock_guard scoped_lock(m_mutex);
320 check();
321 check_init();
323 }

◆ get_candidate_window_before_ts() [1/2]

uint32_t dunedaq::appmodel::RandomTCMakerConf::get_candidate_window_before_ts ( ) const
inline

Get "candidate_window_before_ts" attribute value. Candidate extension before its central time.

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

Definition at line 284 of file RandomTCMakerConf.hpp.

285 {
286 std::lock_guard scoped_lock(m_mutex);
287 check();
288 check_init();
290 }

◆ get_candidate_window_before_ts() [2/2]

uint32_t dunedaq::appmodel::RandomTCMakerConf::get_candidate_window_before_ts ( ) const
inline

Get "candidate_window_before_ts" attribute value. Candidate extension before its central time.

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

Definition at line 284 of file RandomTCMakerConf.hpp.

285 {
286 std::lock_guard scoped_lock(m_mutex);
287 check();
288 check_init();
290 }

◆ get_template_for() [1/2]

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

Get "template_for" attribute value.

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

Definition at line 111 of file RandomTCMakerConf.hpp.

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

◆ get_template_for() [2/2]

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

Get "template_for" attribute value.

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

Definition at line 111 of file RandomTCMakerConf.hpp.

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

◆ get_time_distribution() [1/2]

const std::string & dunedaq::appmodel::RandomTCMakerConf::get_time_distribution ( ) const
inline

Get "time_distribution" attribute value. Type of distribution used for random timestamps (uniform or poisson)

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

Definition at line 185 of file RandomTCMakerConf.hpp.

186 {
187 std::lock_guard scoped_lock(m_mutex);
188 check();
189 check_init();
190 return m_time_distribution;
191 }

◆ get_time_distribution() [2/2]

const std::string & dunedaq::appmodel::RandomTCMakerConf::get_time_distribution ( ) const
inline

Get "time_distribution" attribute value. Type of distribution used for random timestamps (uniform or poisson)

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

Definition at line 185 of file RandomTCMakerConf.hpp.

186 {
187 std::lock_guard scoped_lock(m_mutex);
188 check();
189 check_init();
190 return m_time_distribution;
191 }

◆ get_trigger_rate_hz() [1/2]

float dunedaq::appmodel::RandomTCMakerConf::get_trigger_rate_hz ( ) const
inline

Get "trigger_rate_hz" attribute value. Trigger rate (in Hz) for the RandomTCMaker to produce the TCs.

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

Definition at line 143 of file RandomTCMakerConf.hpp.

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

◆ get_trigger_rate_hz() [2/2]

float dunedaq::appmodel::RandomTCMakerConf::get_trigger_rate_hz ( ) const
inline

Get "trigger_rate_hz" attribute value. Trigger rate (in Hz) for the RandomTCMaker to produce the TCs.

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

Definition at line 143 of file RandomTCMakerConf.hpp.

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

◆ init() [1/2]

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

Initialize object (method generated by genconffwk)

Parameters
init_childrenif true, initialize referenced objects

Reimplemented from dunedaq::appmodel::StandaloneTCMakerConf.

Definition at line 67 of file RandomTCMakerConf.cpp.

68 {
69 StandaloneTCMakerConf::init(init_children);
70
71 TLOG_DEBUG(5) << "read object " << this << " (class " << s_class_name << ')';
72
73 try {
81 }
82 catch (dunedaq::conffwk::Exception & ex) {
83 throw_init_ex(ex);
84 }
85 }
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
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::RandomTCMakerConf::init ( bool init_children)
protectedvirtual

Initialize object (method generated by genconffwk)

Parameters
init_childrenif true, initialize referenced objects

Reimplemented from dunedaq::appmodel::StandaloneTCMakerConf.

◆ print() [1/2]

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

Print details of the RandomTCMakerConf 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

Reimplemented from dunedaq::appmodel::StandaloneTCMakerConf.

Definition at line 35 of file RandomTCMakerConf.cpp.

36 {
37 check_init();
38
39 try {
40 const std::string str(indent+2, ' ');
41
42 if (print_header)
43 p_hdr(s, indent, s_class_name, "dunedaq::appmodel");
44
45
46 // print direct super-classes
47
49
50
51 // print direct attributes
52
60 }
61 catch (dunedaq::conffwk::Exception & ex) {
63 }
64 }
virtual void print(unsigned int offset, bool print_header, std::ostream &s) const
Print details of the StandaloneTCMakerConf object.
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::RandomTCMakerConf::print ( unsigned int offset,
bool print_header,
std::ostream & s ) const
virtual

Print details of the RandomTCMakerConf 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

Reimplemented from dunedaq::appmodel::StandaloneTCMakerConf.

◆ set_candidate_backshift_ts() [1/2]

void dunedaq::appmodel::RandomTCMakerConf::set_candidate_backshift_ts ( int64_t value)
inline

Set "candidate_backshift_ts" attribute value. Time backshift applied to the TC central time at the creation of the TC.

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

Definition at line 267 of file RandomTCMakerConf.hpp.

268 {
269 std::lock_guard scoped_lock(m_mutex);
270 check();
271 clear();
273 }
void set_by_val(const std::string &name, T value)
Set attribute value.

◆ set_candidate_backshift_ts() [2/2]

void dunedaq::appmodel::RandomTCMakerConf::set_candidate_backshift_ts ( int64_t value)
inline

Set "candidate_backshift_ts" attribute value. Time backshift applied to the TC central time at the creation of the TC.

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

Definition at line 267 of file RandomTCMakerConf.hpp.

268 {
269 std::lock_guard scoped_lock(m_mutex);
270 check();
271 clear();
273 }

◆ set_candidate_type_name() [1/2]

void dunedaq::appmodel::RandomTCMakerConf::set_candidate_type_name ( const std::string & value)
inline

Set "candidate_type_name" attribute value. Enumerator name of the TC type, e.g. kTiming.

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

Definition at line 234 of file RandomTCMakerConf.hpp.

235 {
236 std::lock_guard scoped_lock(m_mutex);
237 check();
238 clear();
240 }
void set_by_ref(const std::string &name, T &value)
Set attribute value.

◆ set_candidate_type_name() [2/2]

void dunedaq::appmodel::RandomTCMakerConf::set_candidate_type_name ( const std::string & value)
inline

Set "candidate_type_name" attribute value. Enumerator name of the TC type, e.g. kTiming.

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

Definition at line 234 of file RandomTCMakerConf.hpp.

235 {
236 std::lock_guard scoped_lock(m_mutex);
237 check();
238 clear();
240 }

◆ set_candidate_window_after_ts() [1/2]

void dunedaq::appmodel::RandomTCMakerConf::set_candidate_window_after_ts ( uint32_t value)
inline

Set "candidate_window_after_ts" attribute value. Candidate extension after its central time.

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

Definition at line 333 of file RandomTCMakerConf.hpp.

334 {
335 std::lock_guard scoped_lock(m_mutex);
336 check();
337 clear();
339 }

◆ set_candidate_window_after_ts() [2/2]

void dunedaq::appmodel::RandomTCMakerConf::set_candidate_window_after_ts ( uint32_t value)
inline

Set "candidate_window_after_ts" attribute value. Candidate extension after its central time.

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

Definition at line 333 of file RandomTCMakerConf.hpp.

334 {
335 std::lock_guard scoped_lock(m_mutex);
336 check();
337 clear();
339 }

◆ set_candidate_window_before_ts() [1/2]

void dunedaq::appmodel::RandomTCMakerConf::set_candidate_window_before_ts ( uint32_t value)
inline

Set "candidate_window_before_ts" attribute value. Candidate extension before its central time.

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

Definition at line 300 of file RandomTCMakerConf.hpp.

301 {
302 std::lock_guard scoped_lock(m_mutex);
303 check();
304 clear();
306 }

◆ set_candidate_window_before_ts() [2/2]

void dunedaq::appmodel::RandomTCMakerConf::set_candidate_window_before_ts ( uint32_t value)
inline

Set "candidate_window_before_ts" attribute value. Candidate extension before its central time.

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

Definition at line 300 of file RandomTCMakerConf.hpp.

301 {
302 std::lock_guard scoped_lock(m_mutex);
303 check();
304 clear();
306 }

◆ set_template_for() [1/2]

void dunedaq::appmodel::RandomTCMakerConf::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 126 of file RandomTCMakerConf.hpp.

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

◆ set_template_for() [2/2]

void dunedaq::appmodel::RandomTCMakerConf::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 126 of file RandomTCMakerConf.hpp.

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

◆ set_time_distribution() [1/2]

void dunedaq::appmodel::RandomTCMakerConf::set_time_distribution ( const std::string & value)
inline

Set "time_distribution" attribute value. Type of distribution used for random timestamps (uniform or poisson)

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

Definition at line 201 of file RandomTCMakerConf.hpp.

202 {
203 std::lock_guard scoped_lock(m_mutex);
204 check();
205 clear();
207 }
void set_enum(const std::string &name, const std::string &value)
Set attribute enumeration value.

◆ set_time_distribution() [2/2]

void dunedaq::appmodel::RandomTCMakerConf::set_time_distribution ( const std::string & value)
inline

Set "time_distribution" attribute value. Type of distribution used for random timestamps (uniform or poisson)

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

Definition at line 201 of file RandomTCMakerConf.hpp.

202 {
203 std::lock_guard scoped_lock(m_mutex);
204 check();
205 clear();
207 }

◆ set_trigger_rate_hz() [1/2]

void dunedaq::appmodel::RandomTCMakerConf::set_trigger_rate_hz ( float value)
inline

Set "trigger_rate_hz" attribute value. Trigger rate (in Hz) for the RandomTCMaker to produce the TCs.

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

Definition at line 159 of file RandomTCMakerConf.hpp.

160 {
161 std::lock_guard scoped_lock(m_mutex);
162 check();
163 clear();
165 }

◆ set_trigger_rate_hz() [2/2]

void dunedaq::appmodel::RandomTCMakerConf::set_trigger_rate_hz ( float value)
inline

Set "trigger_rate_hz" attribute value. Trigger rate (in Hz) for the RandomTCMaker to produce the TCs.

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

Definition at line 159 of file RandomTCMakerConf.hpp.

160 {
161 std::lock_guard scoped_lock(m_mutex);
162 check();
163 clear();
165 }

Friends And Related Symbol Documentation

◆ conffwk::Configuration

Definition at line 25 of file RandomTCMakerConf.hpp.

◆ conffwk::DalFactory

conffwk::DalFactory
friend

Definition at line 27 of file RandomTCMakerConf.hpp.

◆ conffwk::DalObject

Definition at line 26 of file RandomTCMakerConf.hpp.

◆ conffwk::DalRegistry

Definition at line 28 of file RandomTCMakerConf.hpp.

Member Data Documentation

◆ m_candidate_backshift_ts

int64_t dunedaq::appmodel::RandomTCMakerConf::m_candidate_backshift_ts
private

Definition at line 78 of file RandomTCMakerConf.hpp.

◆ m_candidate_type_name

std::string dunedaq::appmodel::RandomTCMakerConf::m_candidate_type_name
private

Definition at line 77 of file RandomTCMakerConf.hpp.

◆ m_candidate_window_after_ts

uint32_t dunedaq::appmodel::RandomTCMakerConf::m_candidate_window_after_ts
private

Definition at line 80 of file RandomTCMakerConf.hpp.

◆ m_candidate_window_before_ts

uint32_t dunedaq::appmodel::RandomTCMakerConf::m_candidate_window_before_ts
private

Definition at line 79 of file RandomTCMakerConf.hpp.

◆ m_template_for

std::string dunedaq::appmodel::RandomTCMakerConf::m_template_for
private

Definition at line 74 of file RandomTCMakerConf.hpp.

◆ m_time_distribution

std::string dunedaq::appmodel::RandomTCMakerConf::m_time_distribution
private

Definition at line 76 of file RandomTCMakerConf.hpp.

◆ m_trigger_rate_hz

float dunedaq::appmodel::RandomTCMakerConf::m_trigger_rate_hz
private

Definition at line 75 of file RandomTCMakerConf.hpp.

◆ s_candidate_backshift_ts

static const std::string dunedaq::appmodel::RandomTCMakerConf::s_candidate_backshift_ts = "candidate_backshift_ts"
inlinestatic

Definition at line 91 of file RandomTCMakerConf.hpp.

◆ s_candidate_type_name

static const std::string dunedaq::appmodel::RandomTCMakerConf::s_candidate_type_name = "candidate_type_name"
inlinestatic

Definition at line 90 of file RandomTCMakerConf.hpp.

◆ s_candidate_window_after_ts

static const std::string dunedaq::appmodel::RandomTCMakerConf::s_candidate_window_after_ts = "candidate_window_after_ts"
inlinestatic

Definition at line 93 of file RandomTCMakerConf.hpp.

◆ s_candidate_window_before_ts

static const std::string dunedaq::appmodel::RandomTCMakerConf::s_candidate_window_before_ts = "candidate_window_before_ts"
inlinestatic

Definition at line 92 of file RandomTCMakerConf.hpp.

◆ s_class_name

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

The name of the configuration class.

Definition at line 40 of file RandomTCMakerConf.hpp.

◆ s_template_for

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

Definition at line 87 of file RandomTCMakerConf.hpp.

◆ s_time_distribution

static const std::string dunedaq::appmodel::RandomTCMakerConf::s_time_distribution = "time_distribution"
inlinestatic

Definition at line 89 of file RandomTCMakerConf.hpp.

◆ s_trigger_rate_hz

static const std::string dunedaq::appmodel::RandomTCMakerConf::s_trigger_rate_hz = "trigger_rate_hz"
inlinestatic

Definition at line 88 of file RandomTCMakerConf.hpp.


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