DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
WIBPulserSettings.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _WIBPulserSettings_0_dunedaq__appmodel_0_appmodel_H_
4#define _WIBPulserSettings_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
25
26 friend class conffwk::Configuration;
27 friend class conffwk::DalObject;
28 friend class conffwk::DalFactory;
29 friend class conffwk::DalRegistry;
30
31 protected:
32
34 virtual ~WIBPulserSettings() noexcept;
35 virtual void init(bool init_children);
36
37 public:
38
41 static const std::string& s_class_name;
42
43
53 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
54
55
65 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
66
67
68 protected:
69
70 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
71
72
73 private:
74
75 bool m_enabled_0;
76 bool m_enabled_1;
77 bool m_enabled_2;
78 bool m_enabled_3;
79 uint16_t m_pulse_dac;
80 uint32_t m_pulse_period;
81 uint8_t m_pulse_phase;
82 uint32_t m_pulse_duration;
83
84
85 public:
86
87 // attribute names
88
89 inline static const std::string s_enabled_0 = "enabled_0";
90 inline static const std::string s_enabled_1 = "enabled_1";
91 inline static const std::string s_enabled_2 = "enabled_2";
92 inline static const std::string s_enabled_3 = "enabled_3";
93 inline static const std::string s_pulse_dac = "pulse_dac";
94 inline static const std::string s_pulse_period = "pulse_period";
95 inline static const std::string s_pulse_phase = "pulse_phase";
96 inline static const std::string s_pulse_duration = "pulse_duration";
97
98 static const std::string& __get_enabled_0_str() noexcept { return s_enabled_0; }
99 static const std::string& __get_enabled_1_str() noexcept { return s_enabled_1; }
100 static const std::string& __get_enabled_2_str() noexcept { return s_enabled_2; }
101 static const std::string& __get_enabled_3_str() noexcept { return s_enabled_3; }
102 static const std::string& __get_pulse_dac_str() noexcept { return s_pulse_dac; }
103 static const std::string& __get_pulse_period_str() noexcept { return s_pulse_period; }
104 static const std::string& __get_pulse_phase_str() noexcept { return s_pulse_phase; }
105 static const std::string& __get_pulse_duration_str() noexcept { return s_pulse_duration; }
106
107
115 bool
117 {
118 std::lock_guard scoped_lock(m_mutex);
119 check();
120 check_init();
121 return m_enabled_0;
122 }
123
131 void
132 set_enabled_0(bool value)
133 {
134 std::lock_guard scoped_lock(m_mutex);
135 check();
136 clear();
138 }
139
140
148 bool
150 {
151 std::lock_guard scoped_lock(m_mutex);
152 check();
153 check_init();
154 return m_enabled_1;
155 }
156
164 void
165 set_enabled_1(bool value)
166 {
167 std::lock_guard scoped_lock(m_mutex);
168 check();
169 clear();
171 }
172
173
181 bool
183 {
184 std::lock_guard scoped_lock(m_mutex);
185 check();
186 check_init();
187 return m_enabled_2;
188 }
189
197 void
198 set_enabled_2(bool value)
199 {
200 std::lock_guard scoped_lock(m_mutex);
201 check();
202 clear();
204 }
205
206
214 bool
216 {
217 std::lock_guard scoped_lock(m_mutex);
218 check();
219 check_init();
220 return m_enabled_3;
221 }
222
230 void
231 set_enabled_3(bool value)
232 {
233 std::lock_guard scoped_lock(m_mutex);
234 check();
235 clear();
237 }
238
239
247 uint16_t
249 {
250 std::lock_guard scoped_lock(m_mutex);
251 check();
252 check_init();
253 return m_pulse_dac;
254 }
255
263 void
264 set_pulse_dac(uint16_t value)
265 {
266 std::lock_guard scoped_lock(m_mutex);
267 check();
268 clear();
270 }
271
272
280 uint32_t
282 {
283 std::lock_guard scoped_lock(m_mutex);
284 check();
285 check_init();
286 return m_pulse_period;
287 }
288
296 void
297 set_pulse_period(uint32_t value)
298 {
299 std::lock_guard scoped_lock(m_mutex);
300 check();
301 clear();
303 }
304
305
313 uint8_t
315 {
316 std::lock_guard scoped_lock(m_mutex);
317 check();
318 check_init();
319 return m_pulse_phase;
320 }
321
329 void
330 set_pulse_phase(uint8_t value)
331 {
332 std::lock_guard scoped_lock(m_mutex);
333 check();
334 clear();
336 }
337
338
346 uint32_t
348 {
349 std::lock_guard scoped_lock(m_mutex);
350 check();
351 check_init();
352 return m_pulse_duration;
353 }
354
362 void
363 set_pulse_duration(uint32_t value)
364 {
365 std::lock_guard scoped_lock(m_mutex);
366 check();
367 clear();
369 }
370
371
372 };
373
374 // out stream operator
375
376 inline std::ostream& operator<<(std::ostream& s, const WIBPulserSettings& obj)
377 {
378 return obj.print_object(s);
379 }
380
381 typedef std::vector<const WIBPulserSettings*>::const_iterator WIBPulserSettingsIterator;
382
383 }
384}
385
386#endif
bool get_enabled_1() const
Get "enabled_1" attribute value. Enable WIB pulser for FEMB 1.
uint16_t get_pulse_dac() const
Get "pulse_dac" attribute value. WIB pulser DAC setting. 16 bits [0-65535].
void set_enabled_1(bool value)
Set "enabled_1" attribute value. Enable WIB pulser for FEMB 1.
static const std::string & __get_pulse_dac_str() noexcept
static const std::string & __get_enabled_0_str() noexcept
uint32_t get_pulse_duration() const
Get "pulse_duration" attribute value. WIB pulser pulse duration in system clock units (16 ns)....
uint32_t get_pulse_period() const
Get "pulse_period" attribute value. WIB pulser period in ADC clock units (512 ns)....
static const std::string & __get_pulse_duration_str() noexcept
static const std::string & __get_pulse_period_str() noexcept
static const std::string & __get_enabled_1_str() noexcept
void set_pulse_duration(uint32_t value)
Set "pulse_duration" attribute value. WIB pulser pulse duration in system clock units (16 ns)....
void set_pulse_dac(uint16_t value)
Set "pulse_dac" attribute value. WIB pulser DAC setting. 16 bits [0-65535].
static const std::string & __get_enabled_3_str() noexcept
void set_pulse_phase(uint8_t value)
Set "pulse_phase" attribute value. WIB pulser phase relative to digitization clock [0-31].
void set_pulse_period(uint32_t value)
Set "pulse_period" attribute value. WIB pulser period in ADC clock units (512 ns)....
void set_enabled_2(bool value)
Set "enabled_2" attribute value. Enable WIB pulser for FEMB 2.
static const std::string & s_class_name
static const std::string & __get_enabled_2_str() noexcept
bool get_enabled_3() const
Get "enabled_3" attribute value. Enable WIB pulser for FEMB 3.
void set_enabled_3(bool value)
Set "enabled_3" attribute value. Enable WIB pulser for FEMB 3.
bool get_enabled_0() const
Get "enabled_0" attribute value. Enable WIB pulser for FEMB 0.
static const std::string s_pulse_duration
static const std::string & __get_pulse_phase_str() noexcept
bool get_enabled_2() const
Get "enabled_2" attribute value. Enable WIB pulser for FEMB 2.
uint8_t get_pulse_phase() const
Get "pulse_phase" attribute value. WIB pulser phase relative to digitization clock [0-31].
WIBPulserSettings(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
void set_enabled_0(bool value)
Set "enabled_0" attribute value. Enable WIB pulser for FEMB 0.
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...
virtual void init(bool init_children)
void set_by_val(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::vector< constWIBPulserSettings * >::const_iterator WIBPulserSettingsIterator
std::ostream & operator<<(std::ostream &s, const AVXAbsRunSumProcessor &obj)
Including Qt Headers.