DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
WIBModuleConf.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _WIBModuleConf_0_dunedaq__appmodel_0_appmodel_H_
4#define _WIBModuleConf_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 WIBSettings;
22 }
23}
24
25
26namespace dunedaq {
27 namespace appmodel {
28
30
31 friend class conffwk::Configuration;
32 friend class conffwk::DalObject;
33 friend class conffwk::DalFactory;
34 friend class conffwk::DalRegistry;
35
36 protected:
37
39 virtual ~WIBModuleConf() 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_communication_port;
83
84
85 public:
86
87 // attribute names
88
89 inline static const std::string s_communication_type = "communication_type";
90 inline static const std::string s_communication_port = "communication_port";
91
92 static const std::string& __get_communication_type_str() noexcept { return s_communication_type; }
93 static const std::string& __get_communication_port_str() noexcept { return s_communication_port; }
94
95
102 const std::string&
104 {
105 std::lock_guard scoped_lock(m_mutex);
106 check();
107 check_init();
109 }
110
117 void
118 set_communication_type(const std::string& value)
119 {
120 std::lock_guard scoped_lock(m_mutex);
121 check();
122 clear();
124 }
125
126
133 uint32_t
135 {
136 std::lock_guard scoped_lock(m_mutex);
137 check();
138 check_init();
140 }
141
148 void
150 {
151 std::lock_guard scoped_lock(m_mutex);
152 check();
153 clear();
155 }
156
157
158 // relationship names
159
160 inline static const std::string s_settings = "settings";
161
162 static const std::string& __get_settings_str() noexcept { return s_settings; }
163
164
173 {
174 std::lock_guard scoped_lock(m_mutex);
175 check();
176 check_init();
177 if (!m_settings)
178 {
179 std::ostringstream text;
180 text << "relationship \"" << s_settings << "\" of object " << this << " is not set";
181 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
182 }
183 return m_settings;
184 }
185
186
193 void
195
196 };
197
198 // out stream operator
199
200 inline std::ostream& operator<<(std::ostream& s, const WIBModuleConf& obj)
201 {
202 return obj.print_object(s);
203 }
204
205 typedef std::vector<const WIBModuleConf*>::const_iterator WIBModuleConfIterator;
206
207 }
208}
209
210#endif
#define ERS_HERE
static const std::string & s_class_name
static const std::string s_communication_type
virtual ~WIBModuleConf() noexcept
WIBModuleConf(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
static const std::string s_communication_port
uint32_t get_communication_port() const
Get "communication_port" attribute value.
const dunedaq::appmodel::WIBSettings * get_settings() const
Get "settings" relationship value.
const std::string & get_communication_type() const
Get "communication_type" attribute value.
static const std::string & __get_communication_type_str() noexcept
const dunedaq::appmodel::WIBSettings * m_settings
static const std::string s_settings
static const std::string & __get_communication_port_str() noexcept
friend class conffwk::DalFactory
static const std::string & __get_settings_str() noexcept
void set_settings(const dunedaq::appmodel::WIBSettings *value)
Set "settings" relationship value.
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...
void set_communication_port(uint32_t value)
Set "communication_port" attribute value.
virtual void init(bool init_children)
friend class conffwk::DalObject
void set_communication_type(const std::string &value)
Set "communication_type" attribute 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< constWIBModuleConf * >::const_iterator WIBModuleConfIterator
Including Qt Headers.