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

#include <CIBConf.hpp>

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

Public Member Functions

virtual void print (unsigned int offset, bool print_header, std::ostream &s) const
 Print details of the CIBConf 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_cib_host () const
 Get "cib_host" attribute value. IP address of the board.
 
void set_cib_host (const std::string &value)
 Set "cib_host" attribute value. IP address of the board.
 
uint16_t get_cib_port () const
 Get "cib_port" attribute value. Port where the CIB is listening to.
 
void set_cib_port (uint16_t value)
 Set "cib_port" attribute value. Port where the CIB is listening to.
 
uint16_t get_connection_timeout_ms () const
 Get "connection_timeout_ms" attribute value. Connection timeout.
 
void set_connection_timeout_ms (uint16_t value)
 Set "connection_timeout_ms" attribute value. Connection timeout.
 
uint32_t get_trigger_bit () const
 Get "trigger_bit" attribute value. Trigger bit that this particular instance is associated with.
 
void set_trigger_bit (uint32_t value)
 Set "trigger_bit" attribute value. Trigger bit that this particular instance is associated with.
 
const dunedaq::appmodel::CIBCalibrationStreamget_calibration_stream () const
 Get "calibration_stream" relationship value.
 
void set_calibration_stream (const dunedaq::appmodel::CIBCalibrationStream *value)
 Set "calibration_stream" relationship value.
 
const dunedaq::appmodel::CIBTriggerget_cib_trigger () const
 Get "cib_trigger" relationship value.
 
void set_cib_trigger (const dunedaq::appmodel::CIBTrigger *value)
 Set "cib_trigger" relationship value.
 
const dunedaq::appmodel::CIBTriggerReportget_trigger_report () const
 Get "trigger_report" relationship value.
 
void set_trigger_report (const dunedaq::appmodel::CIBTriggerReport *value)
 Set "trigger_report" relationship value.
 
virtual void print (unsigned int offset, bool print_header, std::ostream &s) const
 Print details of the CIBConf 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_cib_host () const
 Get "cib_host" attribute value. IP address of the board.
 
void set_cib_host (const std::string &value)
 Set "cib_host" attribute value. IP address of the board.
 
uint16_t get_cib_port () const
 Get "cib_port" attribute value. Port where the CIB is listening to.
 
void set_cib_port (uint16_t value)
 Set "cib_port" attribute value. Port where the CIB is listening to.
 
uint16_t get_connection_timeout_ms () const
 Get "connection_timeout_ms" attribute value. Connection timeout.
 
void set_connection_timeout_ms (uint16_t value)
 Set "connection_timeout_ms" attribute value. Connection timeout.
 
uint32_t get_trigger_bit () const
 Get "trigger_bit" attribute value. Trigger bit that this particular instance is associated with.
 
void set_trigger_bit (uint32_t value)
 Set "trigger_bit" attribute value. Trigger bit that this particular instance is associated with.
 
const dunedaq::appmodel::CIBCalibrationStreamget_calibration_stream () const
 Get "calibration_stream" relationship value.
 
void set_calibration_stream (const dunedaq::appmodel::CIBCalibrationStream *value)
 Set "calibration_stream" relationship value.
 
const dunedaq::appmodel::CIBTriggerget_cib_trigger () const
 Get "cib_trigger" relationship value.
 
void set_cib_trigger (const dunedaq::appmodel::CIBTrigger *value)
 Set "cib_trigger" relationship value.
 
const dunedaq::appmodel::CIBTriggerReportget_trigger_report () const
 Get "trigger_report" relationship value.
 
void set_trigger_report (const dunedaq::appmodel::CIBTriggerReport *value)
 Set "trigger_report" 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_cib_host_str () noexcept
 
static const std::string & __get_cib_port_str () noexcept
 
static const std::string & __get_connection_timeout_ms_str () noexcept
 
static const std::string & __get_trigger_bit_str () noexcept
 
static const std::string & __get_calibration_stream_str () noexcept
 
static const std::string & __get_cib_trigger_str () noexcept
 
static const std::string & __get_trigger_report_str () noexcept
 
static const std::string & __get_cib_host_str () noexcept
 
static const std::string & __get_cib_port_str () noexcept
 
static const std::string & __get_connection_timeout_ms_str () noexcept
 
static const std::string & __get_trigger_bit_str () noexcept
 
static const std::string & __get_calibration_stream_str () noexcept
 
static const std::string & __get_cib_trigger_str () noexcept
 
static const std::string & __get_trigger_report_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_cib_host = "cib_host"
 
static const std::string s_cib_port = "cib_port"
 
static const std::string s_connection_timeout_ms = "connection_timeout_ms"
 
static const std::string s_trigger_bit = "trigger_bit"
 
static const std::string s_calibration_stream = "calibration_stream"
 
static const std::string s_cib_trigger = "cib_trigger"
 
static const std::string s_trigger_report = "trigger_report"
 

Protected Member Functions

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

std::string m_cib_host
 
uint16_t m_cib_port
 
uint16_t m_connection_timeout_ms
 
uint32_t m_trigger_bit
 
const dunedaq::appmodel::CIBCalibrationStreamm_calibration_stream
 
const dunedaq::appmodel::CIBTriggerm_cib_trigger
 
const dunedaq::appmodel::CIBTriggerReportm_trigger_report
 

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

Configuration of the connection to the CIB

Definition at line 35 of file CIBConf.hpp.

Constructor & Destructor Documentation

◆ CIBConf() [1/2]

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

Definition at line 33 of file CIBConf.cpp.

33 :
35 m_calibration_stream (nullptr),
36 m_cib_trigger (nullptr),
37 m_trigger_report (nullptr)
38
39 {
40 ;
41 }
const dunedaq::appmodel::CIBTriggerReport * m_trigger_report
Definition CIBConf.hpp:92
const dunedaq::appmodel::CIBTrigger * m_cib_trigger
Definition CIBConf.hpp:91
const dunedaq::appmodel::CIBCalibrationStream * m_calibration_stream
Definition CIBConf.hpp:90
The base class for any generated DAL object.
Definition DalObject.hpp:45

◆ ~CIBConf() [1/2]

dunedaq::appmodel::CIBConf::~CIBConf ( )
protectedvirtualnoexcept

Definition at line 95 of file CIBConf.cpp.

96 {
97 }

◆ CIBConf() [2/2]

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

◆ ~CIBConf() [2/2]

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

Member Function Documentation

◆ __get_calibration_stream_str() [1/2]

static const std::string & dunedaq::appmodel::CIBConf::__get_calibration_stream_str ( )
inlinestaticnoexcept

Definition at line 248 of file CIBConf.hpp.

248{ return s_calibration_stream; }
static const std::string s_calibration_stream
Definition CIBConf.hpp:244

◆ __get_calibration_stream_str() [2/2]

static const std::string & dunedaq::appmodel::CIBConf::__get_calibration_stream_str ( )
inlinestaticnoexcept

Definition at line 248 of file CIBConf.hpp.

248{ return s_calibration_stream; }

◆ __get_cib_host_str() [1/2]

static const std::string & dunedaq::appmodel::CIBConf::__get_cib_host_str ( )
inlinestaticnoexcept

Definition at line 104 of file CIBConf.hpp.

104{ return s_cib_host; }
static const std::string s_cib_host
Definition CIBConf.hpp:99

◆ __get_cib_host_str() [2/2]

static const std::string & dunedaq::appmodel::CIBConf::__get_cib_host_str ( )
inlinestaticnoexcept

Definition at line 104 of file CIBConf.hpp.

104{ return s_cib_host; }

◆ __get_cib_port_str() [1/2]

static const std::string & dunedaq::appmodel::CIBConf::__get_cib_port_str ( )
inlinestaticnoexcept

Definition at line 105 of file CIBConf.hpp.

105{ return s_cib_port; }
static const std::string s_cib_port
Definition CIBConf.hpp:100

◆ __get_cib_port_str() [2/2]

static const std::string & dunedaq::appmodel::CIBConf::__get_cib_port_str ( )
inlinestaticnoexcept

Definition at line 105 of file CIBConf.hpp.

105{ return s_cib_port; }

◆ __get_cib_trigger_str() [1/2]

static const std::string & dunedaq::appmodel::CIBConf::__get_cib_trigger_str ( )
inlinestaticnoexcept

Definition at line 249 of file CIBConf.hpp.

249{ return s_cib_trigger; }
static const std::string s_cib_trigger
Definition CIBConf.hpp:245

◆ __get_cib_trigger_str() [2/2]

static const std::string & dunedaq::appmodel::CIBConf::__get_cib_trigger_str ( )
inlinestaticnoexcept

Definition at line 249 of file CIBConf.hpp.

249{ return s_cib_trigger; }

◆ __get_connection_timeout_ms_str() [1/2]

static const std::string & dunedaq::appmodel::CIBConf::__get_connection_timeout_ms_str ( )
inlinestaticnoexcept

Definition at line 106 of file CIBConf.hpp.

106{ return s_connection_timeout_ms; }
static const std::string s_connection_timeout_ms
Definition CIBConf.hpp:101

◆ __get_connection_timeout_ms_str() [2/2]

static const std::string & dunedaq::appmodel::CIBConf::__get_connection_timeout_ms_str ( )
inlinestaticnoexcept

Definition at line 106 of file CIBConf.hpp.

106{ return s_connection_timeout_ms; }

◆ __get_trigger_bit_str() [1/2]

static const std::string & dunedaq::appmodel::CIBConf::__get_trigger_bit_str ( )
inlinestaticnoexcept

Definition at line 107 of file CIBConf.hpp.

107{ return s_trigger_bit; }
static const std::string s_trigger_bit
Definition CIBConf.hpp:102

◆ __get_trigger_bit_str() [2/2]

static const std::string & dunedaq::appmodel::CIBConf::__get_trigger_bit_str ( )
inlinestaticnoexcept

Definition at line 107 of file CIBConf.hpp.

107{ return s_trigger_bit; }

◆ __get_trigger_report_str() [1/2]

static const std::string & dunedaq::appmodel::CIBConf::__get_trigger_report_str ( )
inlinestaticnoexcept

Definition at line 250 of file CIBConf.hpp.

250{ return s_trigger_report; }
static const std::string s_trigger_report
Definition CIBConf.hpp:246

◆ __get_trigger_report_str() [2/2]

static const std::string & dunedaq::appmodel::CIBConf::__get_trigger_report_str ( )
inlinestaticnoexcept

Definition at line 250 of file CIBConf.hpp.

250{ return s_trigger_report; }

◆ get() [1/4]

std::vector< const dunedaq::conffwk::DalObject * > dunedaq::appmodel::CIBConf::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 99 of file CIBConf.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 CIBConf.hpp:52
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 CIBConf.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::CIBConf::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::CIBConf::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 CIBConf.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 (first_call)
123 return get_algo_objects(name, vec);
124
125 return false;
126 }
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::CIBConf::get ( const std::string & name,
std::vector< const dunedaq::conffwk::DalObject * > & vec,
bool upcast_unregistered,
bool first_call ) const
protected

◆ get_calibration_stream() [1/2]

const dunedaq::appmodel::CIBCalibrationStream * dunedaq::appmodel::CIBConf::get_calibration_stream ( ) const
inline

Get "calibration_stream" relationship value.

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

Definition at line 260 of file CIBConf.hpp.

261 {
262 std::lock_guard scoped_lock(m_mutex);
263 check();
264 check_init();
266 }

◆ get_calibration_stream() [2/2]

const dunedaq::appmodel::CIBCalibrationStream * dunedaq::appmodel::CIBConf::get_calibration_stream ( ) const
inline

Get "calibration_stream" relationship value.

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

Definition at line 260 of file CIBConf.hpp.

261 {
262 std::lock_guard scoped_lock(m_mutex);
263 check();
264 check_init();
266 }

◆ get_cib_host() [1/2]

const std::string & dunedaq::appmodel::CIBConf::get_cib_host ( ) const
inline

Get "cib_host" attribute value. IP address of the board.

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

Definition at line 118 of file CIBConf.hpp.

119 {
120 std::lock_guard scoped_lock(m_mutex);
121 check();
122 check_init();
123 return m_cib_host;
124 }

◆ get_cib_host() [2/2]

const std::string & dunedaq::appmodel::CIBConf::get_cib_host ( ) const
inline

Get "cib_host" attribute value. IP address of the board.

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

Definition at line 118 of file CIBConf.hpp.

119 {
120 std::lock_guard scoped_lock(m_mutex);
121 check();
122 check_init();
123 return m_cib_host;
124 }

◆ get_cib_port() [1/2]

uint16_t dunedaq::appmodel::CIBConf::get_cib_port ( ) const
inline

Get "cib_port" attribute value. Port where the CIB is listening to.

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

Definition at line 151 of file CIBConf.hpp.

152 {
153 std::lock_guard scoped_lock(m_mutex);
154 check();
155 check_init();
156 return m_cib_port;
157 }

◆ get_cib_port() [2/2]

uint16_t dunedaq::appmodel::CIBConf::get_cib_port ( ) const
inline

Get "cib_port" attribute value. Port where the CIB is listening to.

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

Definition at line 151 of file CIBConf.hpp.

152 {
153 std::lock_guard scoped_lock(m_mutex);
154 check();
155 check_init();
156 return m_cib_port;
157 }

◆ get_cib_trigger() [1/2]

const dunedaq::appmodel::CIBTrigger * dunedaq::appmodel::CIBConf::get_cib_trigger ( ) const
inline

Get "cib_trigger" relationship value.

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

Definition at line 285 of file CIBConf.hpp.

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

◆ get_cib_trigger() [2/2]

const dunedaq::appmodel::CIBTrigger * dunedaq::appmodel::CIBConf::get_cib_trigger ( ) const
inline

Get "cib_trigger" relationship value.

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

Definition at line 285 of file CIBConf.hpp.

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

◆ get_connection_timeout_ms() [1/2]

uint16_t dunedaq::appmodel::CIBConf::get_connection_timeout_ms ( ) const
inline

Get "connection_timeout_ms" attribute value. Connection timeout.

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

Definition at line 184 of file CIBConf.hpp.

185 {
186 std::lock_guard scoped_lock(m_mutex);
187 check();
188 check_init();
190 }

◆ get_connection_timeout_ms() [2/2]

uint16_t dunedaq::appmodel::CIBConf::get_connection_timeout_ms ( ) const
inline

Get "connection_timeout_ms" attribute value. Connection timeout.

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

Definition at line 184 of file CIBConf.hpp.

185 {
186 std::lock_guard scoped_lock(m_mutex);
187 check();
188 check_init();
190 }

◆ get_trigger_bit() [1/2]

uint32_t dunedaq::appmodel::CIBConf::get_trigger_bit ( ) const
inline

Get "trigger_bit" attribute value. Trigger bit that this particular instance is associated with.

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

Definition at line 217 of file CIBConf.hpp.

218 {
219 std::lock_guard scoped_lock(m_mutex);
220 check();
221 check_init();
222 return m_trigger_bit;
223 }

◆ get_trigger_bit() [2/2]

uint32_t dunedaq::appmodel::CIBConf::get_trigger_bit ( ) const
inline

Get "trigger_bit" attribute value. Trigger bit that this particular instance is associated with.

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

Definition at line 217 of file CIBConf.hpp.

218 {
219 std::lock_guard scoped_lock(m_mutex);
220 check();
221 check_init();
222 return m_trigger_bit;
223 }

◆ get_trigger_report() [1/2]

const dunedaq::appmodel::CIBTriggerReport * dunedaq::appmodel::CIBConf::get_trigger_report ( ) const
inline

Get "trigger_report" relationship value.

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

Definition at line 316 of file CIBConf.hpp.

317 {
318 std::lock_guard scoped_lock(m_mutex);
319 check();
320 check_init();
321 return m_trigger_report;
322 }

◆ get_trigger_report() [2/2]

const dunedaq::appmodel::CIBTriggerReport * dunedaq::appmodel::CIBConf::get_trigger_report ( ) const
inline

Get "trigger_report" relationship value.

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

Definition at line 316 of file CIBConf.hpp.

317 {
318 std::lock_guard scoped_lock(m_mutex);
319 check();
320 check_init();
321 return m_trigger_report;
322 }

◆ init() [1/2]

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

76 {
77 p_was_read = true;
79 TLOG_DEBUG(5) << "read object " << this << " (class " << s_class_name << ')';
80
81 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
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::CIBConf::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::CIBConf::print ( unsigned int offset,
bool print_header,
std::ostream & s ) const
virtual

Print details of the CIBConf 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 44 of file CIBConf.cpp.

45 {
46 check_init();
47
48 try {
49 const std::string str(indent+2, ' ');
50
51 if (print_header)
52 p_hdr(s, indent, s_class_name, "dunedaq::appmodel");
53
54
55 // print direct attributes
56
61
62
63 // print direct relationships
64
68 }
69 catch (dunedaq::conffwk::Exception & ex) {
71 }
72 }
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::CIBConf::print ( unsigned int offset,
bool print_header,
std::ostream & s ) const
virtual

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

void dunedaq::appmodel::CIBConf::set_calibration_stream ( const dunedaq::appmodel::CIBCalibrationStream * value)

Set "calibration_stream" relationship value.

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

Definition at line 128 of file CIBConf.cpp.

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

◆ set_calibration_stream() [2/2]

void dunedaq::appmodel::CIBConf::set_calibration_stream ( const dunedaq::appmodel::CIBCalibrationStream * value)

Set "calibration_stream" relationship value.

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

◆ set_cib_host() [1/2]

void dunedaq::appmodel::CIBConf::set_cib_host ( const std::string & value)
inline

Set "cib_host" attribute value. IP address of the board.

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

Definition at line 134 of file CIBConf.hpp.

135 {
136 std::lock_guard scoped_lock(m_mutex);
137 check();
138 clear();
140 }
void set_by_ref(const std::string &name, T &value)
Set attribute value.

◆ set_cib_host() [2/2]

void dunedaq::appmodel::CIBConf::set_cib_host ( const std::string & value)
inline

Set "cib_host" attribute value. IP address of the board.

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

Definition at line 134 of file CIBConf.hpp.

135 {
136 std::lock_guard scoped_lock(m_mutex);
137 check();
138 clear();
140 }

◆ set_cib_port() [1/2]

void dunedaq::appmodel::CIBConf::set_cib_port ( uint16_t value)
inline

Set "cib_port" attribute value. Port where the CIB is listening to.

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

Definition at line 167 of file CIBConf.hpp.

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

◆ set_cib_port() [2/2]

void dunedaq::appmodel::CIBConf::set_cib_port ( uint16_t value)
inline

Set "cib_port" attribute value. Port where the CIB is listening to.

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

Definition at line 167 of file CIBConf.hpp.

168 {
169 std::lock_guard scoped_lock(m_mutex);
170 check();
171 clear();
173 }

◆ set_cib_trigger() [1/2]

void dunedaq::appmodel::CIBConf::set_cib_trigger ( const dunedaq::appmodel::CIBTrigger * value)

Set "cib_trigger" relationship value.

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

Definition at line 133 of file CIBConf.cpp.

134 {
136 }

◆ set_cib_trigger() [2/2]

void dunedaq::appmodel::CIBConf::set_cib_trigger ( const dunedaq::appmodel::CIBTrigger * value)

Set "cib_trigger" relationship value.

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

◆ set_connection_timeout_ms() [1/2]

void dunedaq::appmodel::CIBConf::set_connection_timeout_ms ( uint16_t value)
inline

Set "connection_timeout_ms" attribute value. Connection timeout.

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

Definition at line 200 of file CIBConf.hpp.

201 {
202 std::lock_guard scoped_lock(m_mutex);
203 check();
204 clear();
206 }

◆ set_connection_timeout_ms() [2/2]

void dunedaq::appmodel::CIBConf::set_connection_timeout_ms ( uint16_t value)
inline

Set "connection_timeout_ms" attribute value. Connection timeout.

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

Definition at line 200 of file CIBConf.hpp.

201 {
202 std::lock_guard scoped_lock(m_mutex);
203 check();
204 clear();
206 }

◆ set_trigger_bit() [1/2]

void dunedaq::appmodel::CIBConf::set_trigger_bit ( uint32_t value)
inline

Set "trigger_bit" attribute value. Trigger bit that this particular instance is associated with.

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

Definition at line 233 of file CIBConf.hpp.

234 {
235 std::lock_guard scoped_lock(m_mutex);
236 check();
237 clear();
239 }

◆ set_trigger_bit() [2/2]

void dunedaq::appmodel::CIBConf::set_trigger_bit ( uint32_t value)
inline

Set "trigger_bit" attribute value. Trigger bit that this particular instance is associated with.

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

Definition at line 233 of file CIBConf.hpp.

234 {
235 std::lock_guard scoped_lock(m_mutex);
236 check();
237 clear();
239 }

◆ set_trigger_report() [1/2]

void dunedaq::appmodel::CIBConf::set_trigger_report ( const dunedaq::appmodel::CIBTriggerReport * value)

Set "trigger_report" relationship value.

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

Definition at line 138 of file CIBConf.cpp.

139 {
141 }

◆ set_trigger_report() [2/2]

void dunedaq::appmodel::CIBConf::set_trigger_report ( const dunedaq::appmodel::CIBTriggerReport * value)

Set "trigger_report" relationship value.

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

Friends And Related Symbol Documentation

◆ conffwk::Configuration

Definition at line 37 of file CIBConf.hpp.

◆ conffwk::DalFactory

conffwk::DalFactory
friend

Definition at line 39 of file CIBConf.hpp.

◆ conffwk::DalObject

Definition at line 38 of file CIBConf.hpp.

◆ conffwk::DalRegistry

Definition at line 40 of file CIBConf.hpp.

Member Data Documentation

◆ m_calibration_stream

const dunedaq::appmodel::CIBCalibrationStream * dunedaq::appmodel::CIBConf::m_calibration_stream
private

Definition at line 90 of file CIBConf.hpp.

◆ m_cib_host

std::string dunedaq::appmodel::CIBConf::m_cib_host
private

Definition at line 86 of file CIBConf.hpp.

◆ m_cib_port

uint16_t dunedaq::appmodel::CIBConf::m_cib_port
private

Definition at line 87 of file CIBConf.hpp.

◆ m_cib_trigger

const dunedaq::appmodel::CIBTrigger * dunedaq::appmodel::CIBConf::m_cib_trigger
private

Definition at line 91 of file CIBConf.hpp.

◆ m_connection_timeout_ms

uint16_t dunedaq::appmodel::CIBConf::m_connection_timeout_ms
private

Definition at line 88 of file CIBConf.hpp.

◆ m_trigger_bit

uint32_t dunedaq::appmodel::CIBConf::m_trigger_bit
private

Definition at line 89 of file CIBConf.hpp.

◆ m_trigger_report

const dunedaq::appmodel::CIBTriggerReport * dunedaq::appmodel::CIBConf::m_trigger_report
private

Definition at line 92 of file CIBConf.hpp.

◆ s_calibration_stream

static const std::string dunedaq::appmodel::CIBConf::s_calibration_stream = "calibration_stream"
inlinestatic

Definition at line 244 of file CIBConf.hpp.

◆ s_cib_host

static const std::string dunedaq::appmodel::CIBConf::s_cib_host = "cib_host"
inlinestatic

Definition at line 99 of file CIBConf.hpp.

◆ s_cib_port

static const std::string dunedaq::appmodel::CIBConf::s_cib_port = "cib_port"
inlinestatic

Definition at line 100 of file CIBConf.hpp.

◆ s_cib_trigger

static const std::string dunedaq::appmodel::CIBConf::s_cib_trigger = "cib_trigger"
inlinestatic

Definition at line 245 of file CIBConf.hpp.

◆ s_class_name

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

The name of the configuration class.

Definition at line 52 of file CIBConf.hpp.

◆ s_connection_timeout_ms

static const std::string dunedaq::appmodel::CIBConf::s_connection_timeout_ms = "connection_timeout_ms"
inlinestatic

Definition at line 101 of file CIBConf.hpp.

◆ s_trigger_bit

static const std::string dunedaq::appmodel::CIBConf::s_trigger_bit = "trigger_bit"
inlinestatic

Definition at line 102 of file CIBConf.hpp.

◆ s_trigger_report

static const std::string dunedaq::appmodel::CIBConf::s_trigger_report = "trigger_report"
inlinestatic

Definition at line 246 of file CIBConf.hpp.


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