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

#include <DaphneConf.hpp>

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

Public Member Functions

virtual void print (unsigned int offset, bool print_header, std::ostream &s) const
 Print details of the DaphneConf 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.
 
uint16_t get_timeout_ms () const
 Get "timeout_ms" attribute value. timeout used for the board operations.
 
void set_timeout_ms (uint16_t value)
 Set "timeout_ms" attribute value. timeout used for the board operations.
 
bool get_time_reset () const
 Get "time_reset" attribute value. If True, it performs the time reset at configuration. If False, that is skipped.
 
void set_time_reset (bool value)
 Set "time_reset" attribute value. If True, it performs the time reset at configuration. If False, that is skipped.
 
const dunedaq::appmodel::DaphneV2BoardConfget_default_v2_settings () const
 Get "default_v2_settings" relationship value. Value to be used during scrap.
 
void set_default_v2_settings (const dunedaq::appmodel::DaphneV2BoardConf *value)
 Set "default_v2_settings" relationship value. Value to be used during scrap.
 
const std::vector< const dunedaq::appmodel::DaphneMapEntry * > & get_boards () const
 Get "boards" relationship value.
 
void set_boards (const std::vector< const dunedaq::appmodel::DaphneMapEntry * > &value)
 Set "boards" relationship value.
 
const dunedaq::appmodel::DaphneV2BoardConfget_default_v3_settings () const
 Get "default_v3_settings" relationship value.
 
void set_default_v3_settings (const dunedaq::appmodel::DaphneV2BoardConf *value)
 Set "default_v3_settings" relationship value.
 
std::chrono::milliseconds get_timeout () const
 
virtual void print (unsigned int offset, bool print_header, std::ostream &s) const
 Print details of the DaphneConf 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.
 
uint16_t get_timeout_ms () const
 Get "timeout_ms" attribute value. timeout used for the board operations.
 
void set_timeout_ms (uint16_t value)
 Set "timeout_ms" attribute value. timeout used for the board operations.
 
bool get_time_reset () const
 Get "time_reset" attribute value. If True, it performs the time reset at configuration. If False, that is skipped.
 
void set_time_reset (bool value)
 Set "time_reset" attribute value. If True, it performs the time reset at configuration. If False, that is skipped.
 
const dunedaq::appmodel::DaphneV2BoardConfget_default_v2_settings () const
 Get "default_v2_settings" relationship value. Value to be used during scrap.
 
void set_default_v2_settings (const dunedaq::appmodel::DaphneV2BoardConf *value)
 Set "default_v2_settings" relationship value. Value to be used during scrap.
 
const std::vector< const dunedaq::appmodel::DaphneMapEntry * > & get_boards () const
 Get "boards" relationship value.
 
void set_boards (const std::vector< const dunedaq::appmodel::DaphneMapEntry * > &value)
 Set "boards" relationship value.
 
const dunedaq::appmodel::DaphneV2BoardConfget_default_v3_settings () const
 Get "default_v3_settings" relationship value.
 
void set_default_v3_settings (const dunedaq::appmodel::DaphneV2BoardConf *value)
 Set "default_v3_settings" relationship value.
 
std::chrono::milliseconds get_timeout () const
 
- 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_timeout_ms_str () noexcept
 
static const std::string & __get_time_reset_str () noexcept
 
static const std::string & __get_default_v2_settings_str () noexcept
 
static const std::string & __get_boards_str () noexcept
 
static const std::string & __get_default_v3_settings_str () noexcept
 
static const std::string & __get_timeout_ms_str () noexcept
 
static const std::string & __get_time_reset_str () noexcept
 
static const std::string & __get_default_v2_settings_str () noexcept
 
static const std::string & __get_boards_str () noexcept
 
static const std::string & __get_default_v3_settings_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_timeout_ms = "timeout_ms"
 
static const std::string s_time_reset = "time_reset"
 
static const std::string s_default_v2_settings = "default_v2_settings"
 
static const std::string s_boards = "boards"
 
static const std::string s_default_v3_settings = "default_v3_settings"
 

Protected Member Functions

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

uint16_t m_timeout_ms
 
bool m_time_reset
 
const dunedaq::appmodel::DaphneV2BoardConfm_default_v2_settings
 
std::vector< const dunedaq::appmodel::DaphneMapEntry * > m_boards
 
const dunedaq::appmodel::DaphneV2BoardConfm_default_v3_settings
 

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

Top entry for the configuraiton of a single daphne board

Definition at line 38 of file DaphneConf.hpp.

Constructor & Destructor Documentation

◆ DaphneConf() [1/2]

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

Definition at line 32 of file DaphneConf.cpp.

32 :
34 m_default_v2_settings (nullptr),
35 m_default_v3_settings (nullptr)
36
37 {
38 ;
39 }
const dunedaq::appmodel::DaphneV2BoardConf * m_default_v3_settings
const dunedaq::appmodel::DaphneV2BoardConf * m_default_v2_settings
The base class for any generated DAL object.
Definition DalObject.hpp:45

◆ ~DaphneConf() [1/2]

dunedaq::appmodel::DaphneConf::~DaphneConf ( )
protectedvirtualnoexcept

Definition at line 89 of file DaphneConf.cpp.

90 {
91 }

◆ DaphneConf() [2/2]

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

◆ ~DaphneConf() [2/2]

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

Member Function Documentation

◆ __get_boards_str() [1/2]

static const std::string & dunedaq::appmodel::DaphneConf::__get_boards_str ( )
inlinestaticnoexcept

Definition at line 180 of file DaphneConf.hpp.

180{ return s_boards; }
static const std::string s_boards

◆ __get_boards_str() [2/2]

static const std::string & dunedaq::appmodel::DaphneConf::__get_boards_str ( )
inlinestaticnoexcept

Definition at line 180 of file DaphneConf.hpp.

180{ return s_boards; }

◆ __get_default_v2_settings_str() [1/2]

static const std::string & dunedaq::appmodel::DaphneConf::__get_default_v2_settings_str ( )
inlinestaticnoexcept

Definition at line 179 of file DaphneConf.hpp.

179{ return s_default_v2_settings; }
static const std::string s_default_v2_settings

◆ __get_default_v2_settings_str() [2/2]

static const std::string & dunedaq::appmodel::DaphneConf::__get_default_v2_settings_str ( )
inlinestaticnoexcept

Definition at line 179 of file DaphneConf.hpp.

179{ return s_default_v2_settings; }

◆ __get_default_v3_settings_str() [1/2]

static const std::string & dunedaq::appmodel::DaphneConf::__get_default_v3_settings_str ( )
inlinestaticnoexcept

Definition at line 181 of file DaphneConf.hpp.

181{ return s_default_v3_settings; }
static const std::string s_default_v3_settings

◆ __get_default_v3_settings_str() [2/2]

static const std::string & dunedaq::appmodel::DaphneConf::__get_default_v3_settings_str ( )
inlinestaticnoexcept

Definition at line 181 of file DaphneConf.hpp.

181{ return s_default_v3_settings; }

◆ __get_time_reset_str() [1/2]

static const std::string & dunedaq::appmodel::DaphneConf::__get_time_reset_str ( )
inlinestaticnoexcept

Definition at line 104 of file DaphneConf.hpp.

104{ return s_time_reset; }
static const std::string s_time_reset

◆ __get_time_reset_str() [2/2]

static const std::string & dunedaq::appmodel::DaphneConf::__get_time_reset_str ( )
inlinestaticnoexcept

Definition at line 104 of file DaphneConf.hpp.

104{ return s_time_reset; }

◆ __get_timeout_ms_str() [1/2]

static const std::string & dunedaq::appmodel::DaphneConf::__get_timeout_ms_str ( )
inlinestaticnoexcept

Definition at line 103 of file DaphneConf.hpp.

103{ return s_timeout_ms; }
static const std::string s_timeout_ms

◆ __get_timeout_ms_str() [2/2]

static const std::string & dunedaq::appmodel::DaphneConf::__get_timeout_ms_str ( )
inlinestaticnoexcept

Definition at line 103 of file DaphneConf.hpp.

103{ return s_timeout_ms; }

◆ get() [1/4]

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

94 {
95 std::vector<const dunedaq::conffwk::DalObject *> vec;
96
97 if (!get(name, vec, upcast_unregistered, true))
98 throw_get_ex(name, s_class_name, this);
99
100 return vec;
101 }
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::DaphneConf::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::DaphneConf::get ( const std::string & name,
std::vector< const dunedaq::conffwk::DalObject * > & vec,
bool upcast_unregistered,
bool first_call ) const
protected

Definition at line 103 of file DaphneConf.cpp.

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

◆ get_boards() [1/2]

const std::vector< const dunedaq::appmodel::DaphneMapEntry * > & dunedaq::appmodel::DaphneConf::get_boards ( ) const
inline

Get "boards" relationship value.

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

Definition at line 224 of file DaphneConf.hpp.

225 {
226 std::lock_guard scoped_lock(m_mutex);
227 check();
228 check_init();
229 return m_boards;
230 }
std::vector< const dunedaq::appmodel::DaphneMapEntry * > m_boards

◆ get_boards() [2/2]

const std::vector< const dunedaq::appmodel::DaphneMapEntry * > & dunedaq::appmodel::DaphneConf::get_boards ( ) const
inline

Get "boards" relationship value.

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

Definition at line 224 of file DaphneConf.hpp.

225 {
226 std::lock_guard scoped_lock(m_mutex);
227 check();
228 check_init();
229 return m_boards;
230 }

◆ get_default_v2_settings() [1/2]

const dunedaq::appmodel::DaphneV2BoardConf * dunedaq::appmodel::DaphneConf::get_default_v2_settings ( ) const
inline

Get "default_v2_settings" relationship value. Value to be used during scrap.

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

Definition at line 192 of file DaphneConf.hpp.

193 {
194 std::lock_guard scoped_lock(m_mutex);
195 check();
196 check_init();
198 {
199 std::ostringstream text;
200 text << "relationship \"" << s_default_v2_settings << "\" of object " << this << " is not set";
201 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
202 }
204 }
#define ERS_HERE
Generic configuration exception.

◆ get_default_v2_settings() [2/2]

const dunedaq::appmodel::DaphneV2BoardConf * dunedaq::appmodel::DaphneConf::get_default_v2_settings ( ) const
inline

Get "default_v2_settings" relationship value. Value to be used during scrap.

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

Definition at line 192 of file DaphneConf.hpp.

193 {
194 std::lock_guard scoped_lock(m_mutex);
195 check();
196 check_init();
198 {
199 std::ostringstream text;
200 text << "relationship \"" << s_default_v2_settings << "\" of object " << this << " is not set";
201 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
202 }
204 }

◆ get_default_v3_settings() [1/2]

const dunedaq::appmodel::DaphneV2BoardConf * dunedaq::appmodel::DaphneConf::get_default_v3_settings ( ) const
inline

Get "default_v3_settings" relationship value.

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

Definition at line 249 of file DaphneConf.hpp.

250 {
251 std::lock_guard scoped_lock(m_mutex);
252 check();
253 check_init();
255 {
256 std::ostringstream text;
257 text << "relationship \"" << s_default_v3_settings << "\" of object " << this << " is not set";
258 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
259 }
261 }

◆ get_default_v3_settings() [2/2]

const dunedaq::appmodel::DaphneV2BoardConf * dunedaq::appmodel::DaphneConf::get_default_v3_settings ( ) const
inline

Get "default_v3_settings" relationship value.

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

Definition at line 249 of file DaphneConf.hpp.

250 {
251 std::lock_guard scoped_lock(m_mutex);
252 check();
253 check_init();
255 {
256 std::ostringstream text;
257 text << "relationship \"" << s_default_v3_settings << "\" of object " << this << " is not set";
258 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
259 }
261 }

◆ get_time_reset() [1/2]

bool dunedaq::appmodel::DaphneConf::get_time_reset ( ) const
inline

Get "time_reset" attribute value. If True, it performs the time reset at configuration. If False, that is skipped.

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

Definition at line 148 of file DaphneConf.hpp.

149 {
150 std::lock_guard scoped_lock(m_mutex);
151 check();
152 check_init();
153 return m_time_reset;
154 }

◆ get_time_reset() [2/2]

bool dunedaq::appmodel::DaphneConf::get_time_reset ( ) const
inline

Get "time_reset" attribute value. If True, it performs the time reset at configuration. If False, that is skipped.

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

Definition at line 148 of file DaphneConf.hpp.

149 {
150 std::lock_guard scoped_lock(m_mutex);
151 check();
152 check_init();
153 return m_time_reset;
154 }

◆ get_timeout() [1/2]

std::chrono::milliseconds dunedaq::appmodel::DaphneConf::get_timeout ( ) const

get the interval casted in ms

Definition at line 143 of file DaphneConf.cpp.

144 {
145return std::chrono::milliseconds(get_timeout_ms());
146 }
uint16_t get_timeout_ms() const
Get "timeout_ms" attribute value. timeout used for the board operations.

◆ get_timeout() [2/2]

std::chrono::milliseconds dunedaq::appmodel::DaphneConf::get_timeout ( ) const

get the interval casted in ms

◆ get_timeout_ms() [1/2]

uint16_t dunedaq::appmodel::DaphneConf::get_timeout_ms ( ) const
inline

Get "timeout_ms" attribute value. timeout used for the board operations.

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

Definition at line 115 of file DaphneConf.hpp.

116 {
117 std::lock_guard scoped_lock(m_mutex);
118 check();
119 check_init();
120 return m_timeout_ms;
121 }

◆ get_timeout_ms() [2/2]

uint16_t dunedaq::appmodel::DaphneConf::get_timeout_ms ( ) const
inline

Get "timeout_ms" attribute value. timeout used for the board operations.

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

Definition at line 115 of file DaphneConf.hpp.

116 {
117 std::lock_guard scoped_lock(m_mutex);
118 check();
119 check_init();
120 return m_timeout_ms;
121 }

◆ init() [1/2]

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

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

◆ init() [2/2]

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

Print details of the DaphneConf 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 42 of file DaphneConf.cpp.

43 {
44 check_init();
45
46 try {
47 const std::string str(indent+2, ' ');
48
49 if (print_header)
50 p_hdr(s, indent, s_class_name, "dunedaq::appmodel");
51
52
53 // print direct attributes
54
57
58
59 // print direct relationships
60
64 }
65 catch (dunedaq::conffwk::Exception & ex) {
67 }
68 }
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_mv_rel(std::ostream &s, const std::string &str, const std::string &name, const T &objs) noexcept
print weak multi-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::DaphneConf::print ( unsigned int offset,
bool print_header,
std::ostream & s ) const
virtual

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

void dunedaq::appmodel::DaphneConf::set_boards ( const std::vector< const dunedaq::appmodel::DaphneMapEntry * > & value)

Set "boards" relationship value.

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

Definition at line 127 of file DaphneConf.cpp.

128 {
129 _set_objects(s_boards, value);
130 }
void _set_objects(const std::string &name, const std::vector< const T * > &value)
Helper method for generated set multi-value relationship methods.

◆ set_boards() [2/2]

void dunedaq::appmodel::DaphneConf::set_boards ( const std::vector< const dunedaq::appmodel::DaphneMapEntry * > & value)

Set "boards" relationship value.

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

◆ set_default_v2_settings() [1/2]

void dunedaq::appmodel::DaphneConf::set_default_v2_settings ( const dunedaq::appmodel::DaphneV2BoardConf * value)

Set "default_v2_settings" relationship value. Value to be used during scrap.

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

Definition at line 122 of file DaphneConf.cpp.

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

◆ set_default_v2_settings() [2/2]

void dunedaq::appmodel::DaphneConf::set_default_v2_settings ( const dunedaq::appmodel::DaphneV2BoardConf * value)

Set "default_v2_settings" relationship value. Value to be used during scrap.

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

◆ set_default_v3_settings() [1/2]

void dunedaq::appmodel::DaphneConf::set_default_v3_settings ( const dunedaq::appmodel::DaphneV2BoardConf * value)

Set "default_v3_settings" relationship value.

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

Definition at line 132 of file DaphneConf.cpp.

133 {
135 }

◆ set_default_v3_settings() [2/2]

void dunedaq::appmodel::DaphneConf::set_default_v3_settings ( const dunedaq::appmodel::DaphneV2BoardConf * value)

Set "default_v3_settings" relationship value.

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

◆ set_time_reset() [1/2]

void dunedaq::appmodel::DaphneConf::set_time_reset ( bool value)
inline

Set "time_reset" attribute value. If True, it performs the time reset at configuration. If False, that is skipped.

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

Definition at line 164 of file DaphneConf.hpp.

165 {
166 std::lock_guard scoped_lock(m_mutex);
167 check();
168 clear();
170 }
void set_by_val(const std::string &name, T value)
Set attribute value.

◆ set_time_reset() [2/2]

void dunedaq::appmodel::DaphneConf::set_time_reset ( bool value)
inline

Set "time_reset" attribute value. If True, it performs the time reset at configuration. If False, that is skipped.

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

Definition at line 164 of file DaphneConf.hpp.

165 {
166 std::lock_guard scoped_lock(m_mutex);
167 check();
168 clear();
170 }

◆ set_timeout_ms() [1/2]

void dunedaq::appmodel::DaphneConf::set_timeout_ms ( uint16_t value)
inline

Set "timeout_ms" attribute value. timeout used for the board operations.

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

Definition at line 131 of file DaphneConf.hpp.

132 {
133 std::lock_guard scoped_lock(m_mutex);
134 check();
135 clear();
137 }

◆ set_timeout_ms() [2/2]

void dunedaq::appmodel::DaphneConf::set_timeout_ms ( uint16_t value)
inline

Set "timeout_ms" attribute value. timeout used for the board operations.

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

Definition at line 131 of file DaphneConf.hpp.

132 {
133 std::lock_guard scoped_lock(m_mutex);
134 check();
135 clear();
137 }

Friends And Related Symbol Documentation

◆ conffwk::Configuration

Definition at line 40 of file DaphneConf.hpp.

◆ conffwk::DalFactory

conffwk::DalFactory
friend

Definition at line 42 of file DaphneConf.hpp.

◆ conffwk::DalObject

Definition at line 41 of file DaphneConf.hpp.

◆ conffwk::DalRegistry

Definition at line 43 of file DaphneConf.hpp.

Member Data Documentation

◆ m_boards

std::vector< const dunedaq::appmodel::DaphneMapEntry * > dunedaq::appmodel::DaphneConf::m_boards
private

Definition at line 92 of file DaphneConf.hpp.

◆ m_default_v2_settings

const dunedaq::appmodel::DaphneV2BoardConf * dunedaq::appmodel::DaphneConf::m_default_v2_settings
private

Definition at line 91 of file DaphneConf.hpp.

◆ m_default_v3_settings

const dunedaq::appmodel::DaphneV2BoardConf * dunedaq::appmodel::DaphneConf::m_default_v3_settings
private

Definition at line 93 of file DaphneConf.hpp.

◆ m_time_reset

bool dunedaq::appmodel::DaphneConf::m_time_reset
private

Definition at line 90 of file DaphneConf.hpp.

◆ m_timeout_ms

uint16_t dunedaq::appmodel::DaphneConf::m_timeout_ms
private

Definition at line 89 of file DaphneConf.hpp.

◆ s_boards

static const std::string dunedaq::appmodel::DaphneConf::s_boards = "boards"
inlinestatic

Definition at line 176 of file DaphneConf.hpp.

◆ s_class_name

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

The name of the configuration class.

Definition at line 55 of file DaphneConf.hpp.

◆ s_default_v2_settings

static const std::string dunedaq::appmodel::DaphneConf::s_default_v2_settings = "default_v2_settings"
inlinestatic

Definition at line 175 of file DaphneConf.hpp.

◆ s_default_v3_settings

static const std::string dunedaq::appmodel::DaphneConf::s_default_v3_settings = "default_v3_settings"
inlinestatic

Definition at line 177 of file DaphneConf.hpp.

◆ s_time_reset

static const std::string dunedaq::appmodel::DaphneConf::s_time_reset = "time_reset"
inlinestatic

Definition at line 101 of file DaphneConf.hpp.

◆ s_timeout_ms

static const std::string dunedaq::appmodel::DaphneConf::s_timeout_ms = "timeout_ms"
inlinestatic

Definition at line 100 of file DaphneConf.hpp.


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