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

#include <WIBModule.hpp>

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

Public Member Functions

virtual void print (unsigned int offset, bool print_header, std::ostream &s) const
 Print details of the WIBModule 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_wib_addr () const
 Get "wib_addr" attribute value.
 
void set_wib_addr (const std::string &value)
 Set "wib_addr" attribute value.
 
bool get_enabled_femb0 () const
 Get "enabled_femb0" attribute value. Enable FEMB 0.
 
void set_enabled_femb0 (bool value)
 Set "enabled_femb0" attribute value. Enable FEMB 0.
 
bool get_enabled_femb1 () const
 Get "enabled_femb1" attribute value. Enable FEMB 1.
 
void set_enabled_femb1 (bool value)
 Set "enabled_femb1" attribute value. Enable FEMB 1.
 
bool get_enabled_femb2 () const
 Get "enabled_femb2" attribute value. Enable FEMB 2.
 
void set_enabled_femb2 (bool value)
 Set "enabled_femb2" attribute value. Enable FEMB 2.
 
bool get_enabled_femb3 () const
 Get "enabled_femb3" attribute value. Enable FEMB 3.
 
void set_enabled_femb3 (bool value)
 Set "enabled_femb3" attribute value. Enable FEMB 3.
 
const dunedaq::appmodel::WIBSettingsget_conf () const
 Get "conf" relationship value.
 
void set_conf (const dunedaq::appmodel::WIBSettings *value)
 Set "conf" relationship value.
 
virtual void print (unsigned int offset, bool print_header, std::ostream &s) const
 Print details of the WIBModule 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_wib_addr () const
 Get "wib_addr" attribute value.
 
void set_wib_addr (const std::string &value)
 Set "wib_addr" attribute value.
 
bool get_enabled_femb0 () const
 Get "enabled_femb0" attribute value. Enable FEMB 0.
 
void set_enabled_femb0 (bool value)
 Set "enabled_femb0" attribute value. Enable FEMB 0.
 
bool get_enabled_femb1 () const
 Get "enabled_femb1" attribute value. Enable FEMB 1.
 
void set_enabled_femb1 (bool value)
 Set "enabled_femb1" attribute value. Enable FEMB 1.
 
bool get_enabled_femb2 () const
 Get "enabled_femb2" attribute value. Enable FEMB 2.
 
void set_enabled_femb2 (bool value)
 Set "enabled_femb2" attribute value. Enable FEMB 2.
 
bool get_enabled_femb3 () const
 Get "enabled_femb3" attribute value. Enable FEMB 3.
 
void set_enabled_femb3 (bool value)
 Set "enabled_femb3" attribute value. Enable FEMB 3.
 
const dunedaq::appmodel::WIBSettingsget_conf () const
 Get "conf" relationship value.
 
void set_conf (const dunedaq::appmodel::WIBSettings *value)
 Set "conf" relationship value.
 
- Public Member Functions inherited from dunedaq::confmodel::DaqModule
const std::vector< const dunedaq::confmodel::Connection * > & get_inputs () const
 Get "inputs" relationship value. List of connections to/from this module.
 
void set_inputs (const std::vector< const dunedaq::confmodel::Connection * > &value)
 Set "inputs" relationship value. List of connections to/from this module.
 
const std::vector< const dunedaq::confmodel::Connection * > & get_outputs () const
 Get "outputs" relationship value. Output connections from this module.
 
void set_outputs (const std::vector< const dunedaq::confmodel::Connection * > &value)
 Set "outputs" relationship value. Output connections from this module.
 
const std::vector< const dunedaq::confmodel::HostComponent * > & get_used_resources () const
 Get "used_resources" relationship value.
 
void set_used_resources (const std::vector< const dunedaq::confmodel::HostComponent * > &value)
 Set "used_resources" relationship value.
 
const std::vector< const dunedaq::confmodel::Connection * > & get_inputs () const
 Get "inputs" relationship value. List of connections to/from this module.
 
void set_inputs (const std::vector< const dunedaq::confmodel::Connection * > &value)
 Set "inputs" relationship value. List of connections to/from this module.
 
const std::vector< const dunedaq::confmodel::Connection * > & get_outputs () const
 Get "outputs" relationship value. Output connections from this module.
 
void set_outputs (const std::vector< const dunedaq::confmodel::Connection * > &value)
 Set "outputs" relationship value. Output connections from this module.
 
const std::vector< const dunedaq::confmodel::HostComponent * > & get_used_resources () const
 Get "used_resources" relationship value.
 
void set_used_resources (const std::vector< const dunedaq::confmodel::HostComponent * > &value)
 Set "used_resources" relationship value.
 
- 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_wib_addr_str () noexcept
 
static const std::string & __get_enabled_femb0_str () noexcept
 
static const std::string & __get_enabled_femb1_str () noexcept
 
static const std::string & __get_enabled_femb2_str () noexcept
 
static const std::string & __get_enabled_femb3_str () noexcept
 
static const std::string & __get_conf_str () noexcept
 
static const std::string & __get_wib_addr_str () noexcept
 
static const std::string & __get_enabled_femb0_str () noexcept
 
static const std::string & __get_enabled_femb1_str () noexcept
 
static const std::string & __get_enabled_femb2_str () noexcept
 
static const std::string & __get_enabled_femb3_str () noexcept
 
static const std::string & __get_conf_str () noexcept
 
- Static Public Member Functions inherited from dunedaq::confmodel::DaqModule
static const std::string & __get_inputs_str () noexcept
 
static const std::string & __get_outputs_str () noexcept
 
static const std::string & __get_used_resources_str () noexcept
 
static const std::string & __get_inputs_str () noexcept
 
static const std::string & __get_outputs_str () noexcept
 
static const std::string & __get_used_resources_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_wib_addr = "wib_addr"
 
static const std::string s_enabled_femb0 = "enabled_femb0"
 
static const std::string s_enabled_femb1 = "enabled_femb1"
 
static const std::string s_enabled_femb2 = "enabled_femb2"
 
static const std::string s_enabled_femb3 = "enabled_femb3"
 
static const std::string s_conf = "conf"
 
- Static Public Attributes inherited from dunedaq::confmodel::DaqModule
static const std::string & s_class_name
 
static const std::string s_inputs = "inputs"
 
static const std::string s_outputs = "outputs"
 
static const std::string s_used_resources = "used_resources"
 

Protected Member Functions

 WIBModule (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~WIBModule () 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
 
 WIBModule (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~WIBModule () 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::confmodel::DaqModule
 DaqModule (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~DaqModule () noexcept
 
bool get (const std::string &name, std::vector< const dunedaq::conffwk::DalObject * > &vec, bool upcast_unregistered, bool first_call) const
 
 DaqModule (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~DaqModule () 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_wib_addr
 
bool m_enabled_femb0
 
bool m_enabled_femb1
 
bool m_enabled_femb2
 
bool m_enabled_femb3
 
const dunedaq::appmodel::WIBSettingsm_conf
 

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

Constructor & Destructor Documentation

◆ WIBModule() [1/2]

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

Definition at line 31 of file WIBModule.cpp.

31 :
34 m_conf (nullptr)
35
36 {
37 ;
38 }
const dunedaq::appmodel::WIBSettings * m_conf
Definition WIBModule.hpp:88
The base class for any generated DAL object.
Definition DalObject.hpp:45

◆ ~WIBModule() [1/2]

dunedaq::appmodel::WIBModule::~WIBModule ( )
protectedvirtualnoexcept

Definition at line 95 of file WIBModule.cpp.

96 {
97 }

◆ WIBModule() [2/2]

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

◆ ~WIBModule() [2/2]

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

Member Function Documentation

◆ __get_conf_str() [1/2]

static const std::string & dunedaq::appmodel::WIBModule::__get_conf_str ( )
inlinestaticnoexcept

Definition at line 275 of file WIBModule.hpp.

275{ return s_conf; }
static const std::string s_conf

◆ __get_conf_str() [2/2]

static const std::string & dunedaq::appmodel::WIBModule::__get_conf_str ( )
inlinestaticnoexcept

Definition at line 275 of file WIBModule.hpp.

275{ return s_conf; }

◆ __get_enabled_femb0_str() [1/2]

static const std::string & dunedaq::appmodel::WIBModule::__get_enabled_femb0_str ( )
inlinestaticnoexcept

Definition at line 102 of file WIBModule.hpp.

102{ return s_enabled_femb0; }
static const std::string s_enabled_femb0
Definition WIBModule.hpp:96

◆ __get_enabled_femb0_str() [2/2]

static const std::string & dunedaq::appmodel::WIBModule::__get_enabled_femb0_str ( )
inlinestaticnoexcept

Definition at line 102 of file WIBModule.hpp.

102{ return s_enabled_femb0; }

◆ __get_enabled_femb1_str() [1/2]

static const std::string & dunedaq::appmodel::WIBModule::__get_enabled_femb1_str ( )
inlinestaticnoexcept

Definition at line 103 of file WIBModule.hpp.

103{ return s_enabled_femb1; }
static const std::string s_enabled_femb1
Definition WIBModule.hpp:97

◆ __get_enabled_femb1_str() [2/2]

static const std::string & dunedaq::appmodel::WIBModule::__get_enabled_femb1_str ( )
inlinestaticnoexcept

Definition at line 103 of file WIBModule.hpp.

103{ return s_enabled_femb1; }

◆ __get_enabled_femb2_str() [1/2]

static const std::string & dunedaq::appmodel::WIBModule::__get_enabled_femb2_str ( )
inlinestaticnoexcept

Definition at line 104 of file WIBModule.hpp.

104{ return s_enabled_femb2; }
static const std::string s_enabled_femb2
Definition WIBModule.hpp:98

◆ __get_enabled_femb2_str() [2/2]

static const std::string & dunedaq::appmodel::WIBModule::__get_enabled_femb2_str ( )
inlinestaticnoexcept

Definition at line 104 of file WIBModule.hpp.

104{ return s_enabled_femb2; }

◆ __get_enabled_femb3_str() [1/2]

static const std::string & dunedaq::appmodel::WIBModule::__get_enabled_femb3_str ( )
inlinestaticnoexcept

Definition at line 105 of file WIBModule.hpp.

105{ return s_enabled_femb3; }
static const std::string s_enabled_femb3
Definition WIBModule.hpp:99

◆ __get_enabled_femb3_str() [2/2]

static const std::string & dunedaq::appmodel::WIBModule::__get_enabled_femb3_str ( )
inlinestaticnoexcept

Definition at line 105 of file WIBModule.hpp.

105{ return s_enabled_femb3; }

◆ __get_wib_addr_str() [1/2]

static const std::string & dunedaq::appmodel::WIBModule::__get_wib_addr_str ( )
inlinestaticnoexcept

Definition at line 101 of file WIBModule.hpp.

101{ return s_wib_addr; }
static const std::string s_wib_addr
Definition WIBModule.hpp:95

◆ __get_wib_addr_str() [2/2]

static const std::string & dunedaq::appmodel::WIBModule::__get_wib_addr_str ( )
inlinestaticnoexcept

Definition at line 101 of file WIBModule.hpp.

101{ return s_wib_addr; }

◆ get() [1/4]

std::vector< const dunedaq::conffwk::DalObject * > dunedaq::appmodel::WIBModule::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::confmodel::DaqModule.

Definition at line 99 of file WIBModule.cpp.

100 {
101 std::vector<const dunedaq::conffwk::DalObject *> vec;
102
103 if (!get(name, vec, upcast_unregistered, true))
104 throw_get_ex(name, s_class_name, this);
105
106 return vec;
107 }
static const std::string & s_class_name
Definition WIBModule.hpp:49
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...
Definition WIBModule.cpp:99
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::WIBModule::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::confmodel::DaqModule.

◆ get() [3/4]

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

Definition at line 109 of file WIBModule.cpp.

110 {
111 if (first_call)
112 {
113 std::lock_guard scoped_lock(m_mutex);
114
115 check();
116 check_init();
117
118 if (get_rel_objects(name, upcast_unregistered, vec))
119 return true;
120 }
121
122 if (DaqModule::get(name, vec, upcast_unregistered, false)) return true;
123
124 if (first_call)
125 return get_algo_objects(name, vec);
126
127 return false;
128 }
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::WIBModule::get ( const std::string & name,
std::vector< const dunedaq::conffwk::DalObject * > & vec,
bool upcast_unregistered,
bool first_call ) const
protected

◆ get_conf() [1/2]

const dunedaq::appmodel::WIBSettings * dunedaq::appmodel::WIBModule::get_conf ( ) const
inline

Get "conf" relationship value.

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

Definition at line 285 of file WIBModule.hpp.

286 {
287 std::lock_guard scoped_lock(m_mutex);
288 check();
289 check_init();
290 if (!m_conf)
291 {
292 std::ostringstream text;
293 text << "relationship \"" << s_conf << "\" of object " << this << " is not set";
294 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
295 }
296 return m_conf;
297 }
#define ERS_HERE
Generic configuration exception.

◆ get_conf() [2/2]

const dunedaq::appmodel::WIBSettings * dunedaq::appmodel::WIBModule::get_conf ( ) const
inline

Get "conf" relationship value.

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

Definition at line 285 of file WIBModule.hpp.

286 {
287 std::lock_guard scoped_lock(m_mutex);
288 check();
289 check_init();
290 if (!m_conf)
291 {
292 std::ostringstream text;
293 text << "relationship \"" << s_conf << "\" of object " << this << " is not set";
294 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
295 }
296 return m_conf;
297 }

◆ get_enabled_femb0() [1/2]

bool dunedaq::appmodel::WIBModule::get_enabled_femb0 ( ) const
inline

Get "enabled_femb0" attribute value. Enable FEMB 0.

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

Definition at line 147 of file WIBModule.hpp.

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

◆ get_enabled_femb0() [2/2]

bool dunedaq::appmodel::WIBModule::get_enabled_femb0 ( ) const
inline

Get "enabled_femb0" attribute value. Enable FEMB 0.

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

Definition at line 147 of file WIBModule.hpp.

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

◆ get_enabled_femb1() [1/2]

bool dunedaq::appmodel::WIBModule::get_enabled_femb1 ( ) const
inline

Get "enabled_femb1" attribute value. Enable FEMB 1.

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

Definition at line 180 of file WIBModule.hpp.

181 {
182 std::lock_guard scoped_lock(m_mutex);
183 check();
184 check_init();
185 return m_enabled_femb1;
186 }

◆ get_enabled_femb1() [2/2]

bool dunedaq::appmodel::WIBModule::get_enabled_femb1 ( ) const
inline

Get "enabled_femb1" attribute value. Enable FEMB 1.

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

Definition at line 180 of file WIBModule.hpp.

181 {
182 std::lock_guard scoped_lock(m_mutex);
183 check();
184 check_init();
185 return m_enabled_femb1;
186 }

◆ get_enabled_femb2() [1/2]

bool dunedaq::appmodel::WIBModule::get_enabled_femb2 ( ) const
inline

Get "enabled_femb2" attribute value. Enable FEMB 2.

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

Definition at line 213 of file WIBModule.hpp.

214 {
215 std::lock_guard scoped_lock(m_mutex);
216 check();
217 check_init();
218 return m_enabled_femb2;
219 }

◆ get_enabled_femb2() [2/2]

bool dunedaq::appmodel::WIBModule::get_enabled_femb2 ( ) const
inline

Get "enabled_femb2" attribute value. Enable FEMB 2.

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

Definition at line 213 of file WIBModule.hpp.

214 {
215 std::lock_guard scoped_lock(m_mutex);
216 check();
217 check_init();
218 return m_enabled_femb2;
219 }

◆ get_enabled_femb3() [1/2]

bool dunedaq::appmodel::WIBModule::get_enabled_femb3 ( ) const
inline

Get "enabled_femb3" attribute value. Enable FEMB 3.

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

Definition at line 246 of file WIBModule.hpp.

247 {
248 std::lock_guard scoped_lock(m_mutex);
249 check();
250 check_init();
251 return m_enabled_femb3;
252 }

◆ get_enabled_femb3() [2/2]

bool dunedaq::appmodel::WIBModule::get_enabled_femb3 ( ) const
inline

Get "enabled_femb3" attribute value. Enable FEMB 3.

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

Definition at line 246 of file WIBModule.hpp.

247 {
248 std::lock_guard scoped_lock(m_mutex);
249 check();
250 check_init();
251 return m_enabled_femb3;
252 }

◆ get_wib_addr() [1/2]

const std::string & dunedaq::appmodel::WIBModule::get_wib_addr ( ) const
inline

Get "wib_addr" attribute value.

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

Definition at line 115 of file WIBModule.hpp.

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

◆ get_wib_addr() [2/2]

const std::string & dunedaq::appmodel::WIBModule::get_wib_addr ( ) const
inline

Get "wib_addr" attribute value.

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

Definition at line 115 of file WIBModule.hpp.

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

◆ init() [1/2]

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

Initialize object (method generated by genconffwk)

Parameters
init_childrenif true, initialize referenced objects

Reimplemented from dunedaq::confmodel::DaqModule.

Definition at line 76 of file WIBModule.cpp.

77 {
78 DaqModule::init(init_children);
79
80 TLOG_DEBUG(5) << "read object " << this << " (class " << s_class_name << ')';
81
82 try {
89 }
90 catch (dunedaq::conffwk::Exception & ex) {
91 throw_init_ex(ex);
92 }
93 }
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::WIBModule::init ( bool init_children)
protectedvirtual

Initialize object (method generated by genconffwk)

Parameters
init_childrenif true, initialize referenced objects

Reimplemented from dunedaq::confmodel::DaqModule.

◆ print() [1/2]

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

Print details of the WIBModule 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::confmodel::DaqModule.

Definition at line 41 of file WIBModule.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
64
65
66 // print direct relationships
67
69 }
70 catch (dunedaq::conffwk::Exception & ex) {
72 }
73 }
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
virtual void print(unsigned int offset, bool print_header, std::ostream &s) const
Print details of the DaqModule object.
Definition DaqModule.cpp:28
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::WIBModule::print ( unsigned int offset,
bool print_header,
std::ostream & s ) const
virtual

Print details of the WIBModule 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::confmodel::DaqModule.

◆ set_conf() [1/2]

void dunedaq::appmodel::WIBModule::set_conf ( const dunedaq::appmodel::WIBSettings * value)

Set "conf" relationship value.

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

Definition at line 130 of file WIBModule.cpp.

131 {
132 _set_object(s_conf, value);
133 }
void _set_object(const std::string &name, const T *value)
Helper method for generated set single-value relationship methods.

◆ set_conf() [2/2]

void dunedaq::appmodel::WIBModule::set_conf ( const dunedaq::appmodel::WIBSettings * value)

Set "conf" relationship value.

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

◆ set_enabled_femb0() [1/2]

void dunedaq::appmodel::WIBModule::set_enabled_femb0 ( bool value)
inline

Set "enabled_femb0" attribute value. Enable FEMB 0.

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

Definition at line 163 of file WIBModule.hpp.

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

◆ set_enabled_femb0() [2/2]

void dunedaq::appmodel::WIBModule::set_enabled_femb0 ( bool value)
inline

Set "enabled_femb0" attribute value. Enable FEMB 0.

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

Definition at line 163 of file WIBModule.hpp.

164 {
165 std::lock_guard scoped_lock(m_mutex);
166 check();
167 clear();
169 }

◆ set_enabled_femb1() [1/2]

void dunedaq::appmodel::WIBModule::set_enabled_femb1 ( bool value)
inline

Set "enabled_femb1" attribute value. Enable FEMB 1.

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

Definition at line 196 of file WIBModule.hpp.

197 {
198 std::lock_guard scoped_lock(m_mutex);
199 check();
200 clear();
202 }

◆ set_enabled_femb1() [2/2]

void dunedaq::appmodel::WIBModule::set_enabled_femb1 ( bool value)
inline

Set "enabled_femb1" attribute value. Enable FEMB 1.

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

Definition at line 196 of file WIBModule.hpp.

197 {
198 std::lock_guard scoped_lock(m_mutex);
199 check();
200 clear();
202 }

◆ set_enabled_femb2() [1/2]

void dunedaq::appmodel::WIBModule::set_enabled_femb2 ( bool value)
inline

Set "enabled_femb2" attribute value. Enable FEMB 2.

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

Definition at line 229 of file WIBModule.hpp.

230 {
231 std::lock_guard scoped_lock(m_mutex);
232 check();
233 clear();
235 }

◆ set_enabled_femb2() [2/2]

void dunedaq::appmodel::WIBModule::set_enabled_femb2 ( bool value)
inline

Set "enabled_femb2" attribute value. Enable FEMB 2.

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

Definition at line 229 of file WIBModule.hpp.

230 {
231 std::lock_guard scoped_lock(m_mutex);
232 check();
233 clear();
235 }

◆ set_enabled_femb3() [1/2]

void dunedaq::appmodel::WIBModule::set_enabled_femb3 ( bool value)
inline

Set "enabled_femb3" attribute value. Enable FEMB 3.

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

Definition at line 262 of file WIBModule.hpp.

263 {
264 std::lock_guard scoped_lock(m_mutex);
265 check();
266 clear();
268 }

◆ set_enabled_femb3() [2/2]

void dunedaq::appmodel::WIBModule::set_enabled_femb3 ( bool value)
inline

Set "enabled_femb3" attribute value. Enable FEMB 3.

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

Definition at line 262 of file WIBModule.hpp.

263 {
264 std::lock_guard scoped_lock(m_mutex);
265 check();
266 clear();
268 }

◆ set_wib_addr() [1/2]

void dunedaq::appmodel::WIBModule::set_wib_addr ( const std::string & value)
inline

Set "wib_addr" attribute value.

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

Definition at line 130 of file WIBModule.hpp.

131 {
132 std::lock_guard scoped_lock(m_mutex);
133 check();
134 clear();
136 }
void set_by_ref(const std::string &name, T &value)
Set attribute value.

◆ set_wib_addr() [2/2]

void dunedaq::appmodel::WIBModule::set_wib_addr ( const std::string & value)
inline

Set "wib_addr" attribute value.

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

Definition at line 130 of file WIBModule.hpp.

131 {
132 std::lock_guard scoped_lock(m_mutex);
133 check();
134 clear();
136 }

Friends And Related Symbol Documentation

◆ conffwk::Configuration

Definition at line 34 of file WIBModule.hpp.

◆ conffwk::DalFactory

conffwk::DalFactory
friend

Definition at line 36 of file WIBModule.hpp.

◆ conffwk::DalObject

Definition at line 35 of file WIBModule.hpp.

◆ conffwk::DalRegistry

Definition at line 37 of file WIBModule.hpp.

Member Data Documentation

◆ m_conf

const dunedaq::appmodel::WIBSettings * dunedaq::appmodel::WIBModule::m_conf
private

Definition at line 88 of file WIBModule.hpp.

◆ m_enabled_femb0

bool dunedaq::appmodel::WIBModule::m_enabled_femb0
private

Definition at line 84 of file WIBModule.hpp.

◆ m_enabled_femb1

bool dunedaq::appmodel::WIBModule::m_enabled_femb1
private

Definition at line 85 of file WIBModule.hpp.

◆ m_enabled_femb2

bool dunedaq::appmodel::WIBModule::m_enabled_femb2
private

Definition at line 86 of file WIBModule.hpp.

◆ m_enabled_femb3

bool dunedaq::appmodel::WIBModule::m_enabled_femb3
private

Definition at line 87 of file WIBModule.hpp.

◆ m_wib_addr

std::string dunedaq::appmodel::WIBModule::m_wib_addr
private

Definition at line 83 of file WIBModule.hpp.

◆ s_class_name

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

The name of the configuration class.

Definition at line 49 of file WIBModule.hpp.

◆ s_conf

static const std::string dunedaq::appmodel::WIBModule::s_conf = "conf"
inlinestatic

Definition at line 273 of file WIBModule.hpp.

◆ s_enabled_femb0

static const std::string dunedaq::appmodel::WIBModule::s_enabled_femb0 = "enabled_femb0"
inlinestatic

Definition at line 96 of file WIBModule.hpp.

◆ s_enabled_femb1

static const std::string dunedaq::appmodel::WIBModule::s_enabled_femb1 = "enabled_femb1"
inlinestatic

Definition at line 97 of file WIBModule.hpp.

◆ s_enabled_femb2

static const std::string dunedaq::appmodel::WIBModule::s_enabled_femb2 = "enabled_femb2"
inlinestatic

Definition at line 98 of file WIBModule.hpp.

◆ s_enabled_femb3

static const std::string dunedaq::appmodel::WIBModule::s_enabled_femb3 = "enabled_femb3"
inlinestatic

Definition at line 99 of file WIBModule.hpp.

◆ s_wib_addr

static const std::string dunedaq::appmodel::WIBModule::s_wib_addr = "wib_addr"
inlinestatic

Definition at line 95 of file WIBModule.hpp.


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