DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
SSPRegister.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _SSPRegister_0_dunedaq__appmodel_0_appmodel_H_
4#define _SSPRegister_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
17namespace dunedaq {
18 namespace appmodel {
19
20 class SSPRegister : public virtual dunedaq::conffwk::DalObject {
21
23 friend class conffwk::DalObject;
24 friend class conffwk::DalFactory;
26
27 protected:
28
30 virtual ~SSPRegister() noexcept;
31 virtual void init(bool init_children);
32
33 public:
34
37 static const std::string& s_class_name;
38
39
49 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
50
51
61 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
62
63
64 protected:
65
66 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
67
68
69 private:
70
71 std::string m_name;
72 uint32_t m_address;
73 uint32_t m_value;
74 uint32_t m_mask;
75
76
77 public:
78
79 // attribute names
80
81 inline static const std::string s_name = "name";
82 inline static const std::string s_address = "address";
83 inline static const std::string s_value = "value";
84 inline static const std::string s_mask = "mask";
85
86 static const std::string& __get_name_str() noexcept { return s_name; }
87 static const std::string& __get_address_str() noexcept { return s_address; }
88 static const std::string& __get_value_str() noexcept { return s_value; }
89 static const std::string& __get_mask_str() noexcept { return s_mask; }
90
91
98 const std::string&
99 get_name() const
100 {
101 std::lock_guard scoped_lock(m_mutex);
102 check();
103 check_init();
104 return m_name;
105 }
106
113 void
114 set_name(const std::string& value)
115 {
116 std::lock_guard scoped_lock(m_mutex);
117 check();
118 clear();
119 p_obj.set_by_ref(s_name, value);
120 }
121
122
129 uint32_t
131 {
132 std::lock_guard scoped_lock(m_mutex);
133 check();
134 check_init();
135 return m_address;
136 }
137
144 void
145 set_address(uint32_t value)
146 {
147 std::lock_guard scoped_lock(m_mutex);
148 check();
149 clear();
150 p_obj.set_by_val(s_address, value);
151 }
152
153
160 uint32_t
161 get_value() const
162 {
163 std::lock_guard scoped_lock(m_mutex);
164 check();
165 check_init();
166 return m_value;
167 }
168
175 void
176 set_value(uint32_t value)
177 {
178 std::lock_guard scoped_lock(m_mutex);
179 check();
180 clear();
181 p_obj.set_by_val(s_value, value);
182 }
183
184
191 uint32_t
192 get_mask() const
193 {
194 std::lock_guard scoped_lock(m_mutex);
195 check();
196 check_init();
197 return m_mask;
198 }
199
206 void
207 set_mask(uint32_t value)
208 {
209 std::lock_guard scoped_lock(m_mutex);
210 check();
211 clear();
212 p_obj.set_by_val(s_mask, value);
213 }
214
215
216 };
217
218 // out stream operator
219
220 inline std::ostream& operator<<(std::ostream& s, const SSPRegister& obj)
221 {
222 return obj.print_object(s);
223 }
224
225 typedef std::vector<const SSPRegister*>::const_iterator SSPRegisterIterator;
226
227 }
228}
229
230#endif
static const std::string s_mask
virtual void init(bool init_children)
uint32_t get_mask() const
Get "mask" attribute value.
void set_value(uint32_t value)
Set "value" attribute value.
virtual ~SSPRegister() noexcept
static const std::string & s_class_name
const std::string & get_name() const
Get "name" attribute value.
static const std::string & __get_name_str() noexcept
uint32_t get_value() const
Get "value" attribute value.
SSPRegister(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
friend class conffwk::DalFactory
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_name
void set_name(const std::string &value)
Set "name" attribute value.
static const std::string & __get_value_str() noexcept
friend class conffwk::DalObject
static const std::string & __get_address_str() noexcept
static const std::string & __get_mask_str() noexcept
static const std::string s_value
void set_mask(uint32_t value)
Set "mask" attribute value.
uint32_t get_address() const
Get "address" attribute value.
void set_address(uint32_t value)
Set "address" attribute value.
static const std::string s_address
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...
conffwk entry point
double offset
std::ostream & operator<<(std::ostream &s, const AVXAbsRunSumProcessor &obj)
std::vector< constSSPRegister * >::const_iterator SSPRegisterIterator
Including Qt Headers.