DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
WIBModule.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _WIBModule_0_dunedaq__appmodel_0_appmodel_H_
4#define _WIBModule_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 // include files for classes used in inheritance hierarchy
17
19
20 // forward declaration for classes used in relationships and algorithms
21
22namespace dunedaq {
23 namespace appmodel {
24 class WIBSettings;
25 }
26}
27
28
29namespace dunedaq {
30 namespace appmodel {
31
32 class WIBModule : public dunedaq::confmodel::DaqModule {
33
35 friend class conffwk::DalObject;
36 friend class conffwk::DalFactory;
38
39 protected:
40
42 virtual ~WIBModule() noexcept;
43 virtual void init(bool init_children);
44
45 public:
46
49 static const std::string& s_class_name;
50
51
61 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
62
63
73 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
74
75
76 protected:
77
78 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
79
80
81 private:
82
83 std::string m_wib_addr;
89
90
91 public:
92
93 // attribute names
94
95 inline static const std::string s_wib_addr = "wib_addr";
96 inline static const std::string s_enabled_femb0 = "enabled_femb0";
97 inline static const std::string s_enabled_femb1 = "enabled_femb1";
98 inline static const std::string s_enabled_femb2 = "enabled_femb2";
99 inline static const std::string s_enabled_femb3 = "enabled_femb3";
100
101 static const std::string& __get_wib_addr_str() noexcept { return s_wib_addr; }
102 static const std::string& __get_enabled_femb0_str() noexcept { return s_enabled_femb0; }
103 static const std::string& __get_enabled_femb1_str() noexcept { return s_enabled_femb1; }
104 static const std::string& __get_enabled_femb2_str() noexcept { return s_enabled_femb2; }
105 static const std::string& __get_enabled_femb3_str() noexcept { return s_enabled_femb3; }
106
107
114 const std::string&
116 {
117 std::lock_guard scoped_lock(m_mutex);
118 check();
119 check_init();
120 return m_wib_addr;
121 }
122
129 void
130 set_wib_addr(const std::string& value)
131 {
132 std::lock_guard scoped_lock(m_mutex);
133 check();
134 clear();
136 }
137
138
146 bool
148 {
149 std::lock_guard scoped_lock(m_mutex);
150 check();
151 check_init();
152 return m_enabled_femb0;
153 }
154
162 void
164 {
165 std::lock_guard scoped_lock(m_mutex);
166 check();
167 clear();
169 }
170
171
179 bool
181 {
182 std::lock_guard scoped_lock(m_mutex);
183 check();
184 check_init();
185 return m_enabled_femb1;
186 }
187
195 void
197 {
198 std::lock_guard scoped_lock(m_mutex);
199 check();
200 clear();
202 }
203
204
212 bool
214 {
215 std::lock_guard scoped_lock(m_mutex);
216 check();
217 check_init();
218 return m_enabled_femb2;
219 }
220
228 void
230 {
231 std::lock_guard scoped_lock(m_mutex);
232 check();
233 clear();
235 }
236
237
245 bool
247 {
248 std::lock_guard scoped_lock(m_mutex);
249 check();
250 check_init();
251 return m_enabled_femb3;
252 }
253
261 void
263 {
264 std::lock_guard scoped_lock(m_mutex);
265 check();
266 clear();
268 }
269
270
271 // relationship names
272
273 inline static const std::string s_conf = "conf";
274
275 static const std::string& __get_conf_str() noexcept { return s_conf; }
276
277
285 get_conf() const
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 }
298
299
306 void
308
309 };
310
311 // out stream operator
312
313 inline std::ostream& operator<<(std::ostream& s, const WIBModule& obj)
314 {
315 return obj.print_object(s);
316 }
317
318 typedef std::vector<const WIBModule*>::const_iterator WIBModuleIterator;
319
320 }
321}
322
323#endif
#define ERS_HERE
WIBModule(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
Definition WIBModule.cpp:31
static const std::string & s_class_name
Definition WIBModule.hpp:49
static const std::string & __get_enabled_femb0_str() noexcept
static const std::string & __get_enabled_femb3_str() noexcept
void set_wib_addr(const std::string &value)
Set "wib_addr" attribute value.
bool get_enabled_femb3() const
Get "enabled_femb3" attribute value. Enable FEMB 3.
static const std::string s_enabled_femb0
Definition WIBModule.hpp:96
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
bool get_enabled_femb2() const
Get "enabled_femb2" attribute value. Enable FEMB 2.
virtual ~WIBModule() noexcept
Definition WIBModule.cpp:95
static const std::string s_conf
const dunedaq::appmodel::WIBSettings * m_conf
Definition WIBModule.hpp:88
static const std::string s_enabled_femb3
Definition WIBModule.hpp:99
const dunedaq::appmodel::WIBSettings * get_conf() const
Get "conf" relationship value.
friend class conffwk::DalFactory
Definition WIBModule.hpp:36
virtual void init(bool init_children)
Definition WIBModule.cpp:76
static const std::string s_enabled_femb2
Definition WIBModule.hpp:98
static const std::string s_enabled_femb1
Definition WIBModule.hpp:97
static const std::string s_wib_addr
Definition WIBModule.hpp:95
static const std::string & __get_enabled_femb1_str() noexcept
void set_enabled_femb0(bool value)
Set "enabled_femb0" attribute value. Enable FEMB 0.
bool get_enabled_femb0() const
Get "enabled_femb0" attribute value. Enable FEMB 0.
friend class conffwk::DalObject
Definition WIBModule.hpp:35
void set_enabled_femb1(bool value)
Set "enabled_femb1" attribute value. Enable FEMB 1.
static const std::string & __get_enabled_femb2_str() noexcept
void set_enabled_femb2(bool value)
Set "enabled_femb2" attribute value. Enable FEMB 2.
static const std::string & __get_wib_addr_str() noexcept
const std::string & get_wib_addr() const
Get "wib_addr" attribute value.
static const std::string & __get_conf_str() noexcept
bool get_enabled_femb1() const
Get "enabled_femb1" attribute value. Enable FEMB 1.
void set_enabled_femb3(bool value)
Set "enabled_femb3" attribute value. Enable FEMB 3.
void set_conf(const dunedaq::appmodel::WIBSettings *value)
Set "conf" relationship value.
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::ostream & operator<<(std::ostream &s, const AVXAbsRunSumProcessor &obj)
std::vector< constWIBModule * >::const_iterator WIBModuleIterator
Including Qt Headers.