DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
HermesModuleConf.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _HermesModuleConf_0_dunedaq__appmodel_0_appmodel_H_
4#define _HermesModuleConf_0_dunedaq__appmodel_0_appmodel_H_
5
6#include <stdint.h> // to define 64 bits types
7#include <iostream>
8#include <sstream>
9#include <string>
10#include <map>
11#include <vector>
12
14#include "conffwk/DalObject.hpp"
15
16
17 // forward declaration for classes used in relationships and algorithms
18
19namespace dunedaq {
20 namespace appmodel {
21 class IpbusAddressTable;
22 }
23}
24
25
26namespace dunedaq {
27 namespace appmodel {
28
29 class HermesModuleConf : public virtual dunedaq::conffwk::DalObject {
30
32 friend class conffwk::DalObject;
33 friend class conffwk::DalFactory;
35
36 protected:
37
39 virtual ~HermesModuleConf() noexcept;
40 virtual void init(bool init_children);
41
42 public:
43
46 static const std::string& s_class_name;
47
48
58 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
59
60
70 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
71
72
73 protected:
74
75 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
76
77
78 private:
79
81 uint32_t m_ipbus_port;
84
85
86 public:
87
88 // attribute names
89
90 inline static const std::string s_ipbus_type = "ipbus_type";
91 inline static const std::string s_ipbus_port = "ipbus_port";
92 inline static const std::string s_ipbus_timeout_ms = "ipbus_timeout_ms";
93
94 static const std::string& __get_ipbus_type_str() noexcept { return s_ipbus_type; }
95 static const std::string& __get_ipbus_port_str() noexcept { return s_ipbus_port; }
96 static const std::string& __get_ipbus_timeout_ms_str() noexcept { return s_ipbus_timeout_ms; }
97
98
105 const std::string&
107 {
108 std::lock_guard scoped_lock(m_mutex);
109 check();
110 check_init();
111 return m_ipbus_type;
112 }
113
120 void
121 set_ipbus_type(const std::string& value)
122 {
123 std::lock_guard scoped_lock(m_mutex);
124 check();
125 clear();
127 }
128
129
136 uint32_t
138 {
139 std::lock_guard scoped_lock(m_mutex);
140 check();
141 check_init();
142 return m_ipbus_port;
143 }
144
151 void
152 set_ipbus_port(uint32_t value)
153 {
154 std::lock_guard scoped_lock(m_mutex);
155 check();
156 clear();
158 }
159
160
167 uint32_t
169 {
170 std::lock_guard scoped_lock(m_mutex);
171 check();
172 check_init();
173 return m_ipbus_timeout_ms;
174 }
175
182 void
183 set_ipbus_timeout_ms(uint32_t value)
184 {
185 std::lock_guard scoped_lock(m_mutex);
186 check();
187 clear();
189 }
190
191
192 // relationship names
193
194 inline static const std::string s_address_table = "address_table";
195
196 static const std::string& __get_address_table_str() noexcept { return s_address_table; }
197
198
207 {
208 std::lock_guard scoped_lock(m_mutex);
209 check();
210 check_init();
211 if (!m_address_table)
212 {
213 std::ostringstream text;
214 text << "relationship \"" << s_address_table << "\" of object " << this << " is not set";
215 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
216 }
217 return m_address_table;
218 }
219
220
227 void
229
230 };
231
232 // out stream operator
233
234 inline std::ostream& operator<<(std::ostream& s, const HermesModuleConf& obj)
235 {
236 return obj.print_object(s);
237 }
238
239 typedef std::vector<const HermesModuleConf*>::const_iterator HermesModuleConfIterator;
240
241 }
242}
243
244#endif
#define ERS_HERE
virtual void init(bool init_children)
static const std::string & s_class_name
HermesModuleConf(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
void set_ipbus_port(uint32_t value)
Set "ipbus_port" attribute value.
uint32_t get_ipbus_port() const
Get "ipbus_port" attribute value.
static const std::string & __get_address_table_str() noexcept
const dunedaq::appmodel::IpbusAddressTable * get_address_table() const
Get "address_table" relationship value.
static const std::string s_address_table
static const std::string & __get_ipbus_timeout_ms_str() noexcept
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 const std::string s_ipbus_timeout_ms
static const std::string s_ipbus_port
void set_address_table(const dunedaq::appmodel::IpbusAddressTable *value)
Set "address_table" relationship value.
void set_ipbus_timeout_ms(uint32_t value)
Set "ipbus_timeout_ms" attribute value.
static const std::string & __get_ipbus_type_str() noexcept
const dunedaq::appmodel::IpbusAddressTable * m_address_table
uint32_t get_ipbus_timeout_ms() const
Get "ipbus_timeout_ms" attribute value.
const std::string & get_ipbus_type() const
Get "ipbus_type" attribute value.
static const std::string & __get_ipbus_port_str() noexcept
void set_ipbus_type(const std::string &value)
Set "ipbus_type" attribute value.
static const std::string s_ipbus_type
void set_by_val(const std::string &name, T value)
Set attribute value.
void set_by_ref(const std::string &name, T &value)
Set attribute value.
The base class for any generated DAL object.
Definition DalObject.hpp:45
std::mutex m_mutex
Used to protect changes of DAL object.
ConfigObject p_obj
Config object used by given template object.
void check_init() const
Check and initialize object if necessary.
DalRegistry: A registry of DalObjects It provides a single interface to create, cache and manage DalO...
Generic configuration exception.
conffwk entry point
double offset
std::vector< constHermesModuleConf * >::const_iterator HermesModuleConfIterator
std::ostream & operator<<(std::ostream &s, const AVXAbsRunSumProcessor &obj)
Including Qt Headers.