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 dunedaq::appmodel::TCReadoutMapget_tc_readout () const
 Get "tc_readout" relationship value. Configuration for the TC output type and the TC window size.
 
void set_tc_readout (const dunedaq::appmodel::TCReadoutMap *value)
 Set "tc_readout" relationship value. Configuration for the TC output type and the TC window size.
 
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 dunedaq::appmodel::TCReadoutMapget_tc_readout () const
 Get "tc_readout" relationship value. Configuration for the TC output type and the TC window size.
 
void set_tc_readout (const dunedaq::appmodel::TCReadoutMap *value)
 Set "tc_readout" relationship value. Configuration for the TC output type and the TC window size.
 
- 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_tc_readout_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_tc_readout_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_tc_readout = "tc_readout"
 
- 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
 
const dunedaq::appmodel::TCReadoutMapm_tc_readout
 

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 32 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 31 of file RandomTCMakerConf.cpp.

31 :
34 m_tc_readout (nullptr)
35
36 {
37 ;
38 }
const dunedaq::appmodel::TCReadoutMap * m_tc_readout
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 91 of file RandomTCMakerConf.cpp.

92 {
93 }

◆ 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_tc_readout_str() [1/2]

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

Definition at line 212 of file RandomTCMakerConf.hpp.

212{ return s_tc_readout; }

◆ __get_tc_readout_str() [2/2]

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

Definition at line 212 of file RandomTCMakerConf.hpp.

212{ return s_tc_readout; }

◆ __get_template_for_str() [1/2]

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

Definition at line 97 of file RandomTCMakerConf.hpp.

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

97{ 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 99 of file RandomTCMakerConf.hpp.

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

99{ 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 98 of file RandomTCMakerConf.hpp.

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

98{ 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 95 of file RandomTCMakerConf.cpp.

96 {
97 std::vector<const dunedaq::conffwk::DalObject *> vec;
98
99 if (!get(name, vec, upcast_unregistered, true))
100 throw_get_ex(name, s_class_name, this);
101
102 return vec;
103 }
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 105 of file RandomTCMakerConf.cpp.

106 {
107 if (first_call)
108 {
109 std::lock_guard scoped_lock(m_mutex);
110
111 check();
112 check_init();
113
114 if (get_rel_objects(name, upcast_unregistered, vec))
115 return true;
116 }
117
118 if (StandaloneTCMakerConf::get(name, vec, upcast_unregistered, false)) return true;
119
120 if (first_call)
121 return get_algo_objects(name, vec);
122
123 return false;
124 }
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_tc_readout() [1/2]

const dunedaq::appmodel::TCReadoutMap * dunedaq::appmodel::RandomTCMakerConf::get_tc_readout ( ) const
inline

Get "tc_readout" relationship value. Configuration for the TC output type and the TC window size.

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

Definition at line 223 of file RandomTCMakerConf.hpp.

224 {
225 std::lock_guard scoped_lock(m_mutex);
226 check();
227 check_init();
228 if (!m_tc_readout)
229 {
230 std::ostringstream text;
231 text << "relationship \"" << s_tc_readout << "\" of object " << this << " is not set";
232 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
233 }
234 return m_tc_readout;
235 }
#define ERS_HERE
Generic configuration exception.

◆ get_tc_readout() [2/2]

const dunedaq::appmodel::TCReadoutMap * dunedaq::appmodel::RandomTCMakerConf::get_tc_readout ( ) const
inline

Get "tc_readout" relationship value. Configuration for the TC output type and the TC window size.

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

Definition at line 223 of file RandomTCMakerConf.hpp.

224 {
225 std::lock_guard scoped_lock(m_mutex);
226 check();
227 check_init();
228 if (!m_tc_readout)
229 {
230 std::ostringstream text;
231 text << "relationship \"" << s_tc_readout << "\" of object " << this << " is not set";
232 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
233 }
234 return m_tc_readout;
235 }

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

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

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

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

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

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

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

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

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

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

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

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

◆ 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 74 of file RandomTCMakerConf.cpp.

75 {
76 StandaloneTCMakerConf::init(init_children);
77
78 TLOG_DEBUG(5) << "read object " << this << " (class " << s_class_name << ')';
79
80 try {
85 }
86 catch (dunedaq::conffwk::Exception & ex) {
87 throw_init_ex(ex);
88 }
89 }
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
DalRegistry & p_registry
Configuration object.
ConfigObject p_obj
Config object used by given template object.
const T * _ref(ConfigObject &obj, const std::string &name, bool read_children)
Get signle value of object's relation and instantiate result with it (multi-thread safe).
#define TLOG_DEBUG(lvl,...)
Definition Logging.hpp:112

◆ init() [2/2]

virtual void dunedaq::appmodel::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 41 of file RandomTCMakerConf.cpp.

42 {
43 check_init();
44
45 try {
46 const std::string str(indent+2, ' ');
47
48 if (print_header)
49 p_hdr(s, indent, s_class_name, "dunedaq::appmodel");
50
51
52 // print direct super-classes
53
55
56
57 // print direct attributes
58
62
63
64 // print direct relationships
65
67 }
68 catch (dunedaq::conffwk::Exception & ex) {
70 }
71 }
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_rel(std::ostream &s, const std::string &str, const std::string &name, const DalObject *obj)
print weak single-value relationship
void p_sv_attr(std::ostream &s, const std::string &str, const std::string &name, const T &val) noexcept
print single-value attribute

◆ print() [2/2]

virtual void dunedaq::appmodel::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_tc_readout() [1/2]

void dunedaq::appmodel::RandomTCMakerConf::set_tc_readout ( const dunedaq::appmodel::TCReadoutMap * value)

Set "tc_readout" relationship value. Configuration for the TC output type and the TC window size.

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

Definition at line 126 of file RandomTCMakerConf.cpp.

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

◆ set_tc_readout() [2/2]

void dunedaq::appmodel::RandomTCMakerConf::set_tc_readout ( const dunedaq::appmodel::TCReadoutMap * value)

Set "tc_readout" relationship value. Configuration for the TC output type and the TC window size.

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

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

125 {
126 std::lock_guard scoped_lock(m_mutex);
127 check();
128 clear();
130 }
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 124 of file RandomTCMakerConf.hpp.

125 {
126 std::lock_guard scoped_lock(m_mutex);
127 check();
128 clear();
130 }

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

200 {
201 std::lock_guard scoped_lock(m_mutex);
202 check();
203 clear();
205 }
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 199 of file RandomTCMakerConf.hpp.

200 {
201 std::lock_guard scoped_lock(m_mutex);
202 check();
203 clear();
205 }

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

158 {
159 std::lock_guard scoped_lock(m_mutex);
160 check();
161 clear();
163 }
void set_by_val(const std::string &name, T value)
Set attribute value.

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

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

Friends And Related Symbol Documentation

◆ conffwk::Configuration

Definition at line 34 of file RandomTCMakerConf.hpp.

◆ conffwk::DalFactory

conffwk::DalFactory
friend

Definition at line 36 of file RandomTCMakerConf.hpp.

◆ conffwk::DalObject

Definition at line 35 of file RandomTCMakerConf.hpp.

◆ conffwk::DalRegistry

Definition at line 37 of file RandomTCMakerConf.hpp.

Member Data Documentation

◆ m_tc_readout

const dunedaq::appmodel::TCReadoutMap * dunedaq::appmodel::RandomTCMakerConf::m_tc_readout
private

Definition at line 86 of file RandomTCMakerConf.hpp.

◆ m_template_for

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

Definition at line 83 of file RandomTCMakerConf.hpp.

◆ m_time_distribution

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

Definition at line 85 of file RandomTCMakerConf.hpp.

◆ m_trigger_rate_hz

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

Definition at line 84 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 49 of file RandomTCMakerConf.hpp.

◆ s_tc_readout

static const std::string dunedaq::appmodel::RandomTCMakerConf::s_tc_readout = "tc_readout"
inlinestatic

Definition at line 210 of file RandomTCMakerConf.hpp.

◆ s_template_for

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

Definition at line 93 of file RandomTCMakerConf.hpp.

◆ s_time_distribution

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

Definition at line 95 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 94 of file RandomTCMakerConf.hpp.


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