DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
WIBSettings.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _WIBSettings_0_dunedaq__appmodel_0_appmodel_H_
4#define _WIBSettings_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 ColdADCSettings;
22 class FEMBSettings;
23 class WIBPulserSettings;
24 }
25}
26
27
28namespace dunedaq {
29 namespace appmodel {
30
35 class WIBSettings : public virtual dunedaq::conffwk::DalObject {
36
38 friend class conffwk::DalObject;
39 friend class conffwk::DalFactory;
41
42 protected:
43
45 virtual ~WIBSettings() noexcept;
46 virtual void init(bool init_children);
47
48 public:
49
52 static const std::string& s_class_name;
53
54
64 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
65
66
76 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
77
78
79 protected:
80
81 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
82
83
84 private:
85
86 bool m_cold;
96
97
98 public:
99
100 // attribute names
101
102 inline static const std::string s_cold = "cold";
103 inline static const std::string s_pulser = "pulser";
104 inline static const std::string s_detector_type = "detector_type";
105 inline static const std::string s_adc_test_pattern = "adc_test_pattern";
106
107 static const std::string& __get_cold_str() noexcept { return s_cold; }
108 static const std::string& __get_pulser_str() noexcept { return s_pulser; }
109 static const std::string& __get_detector_type_str() noexcept { return s_detector_type; }
110 static const std::string& __get_adc_test_pattern_str() noexcept { return s_adc_test_pattern; }
111
112
120 bool
121 get_cold() const
122 {
123 std::lock_guard scoped_lock(m_mutex);
124 check();
125 check_init();
126 return m_cold;
127 }
128
136 void
137 set_cold(bool value)
138 {
139 std::lock_guard scoped_lock(m_mutex);
140 check();
141 clear();
142 p_obj.set_by_val(s_cold, value);
143 }
144
145
153 bool
155 {
156 std::lock_guard scoped_lock(m_mutex);
157 check();
158 check_init();
159 return m_pulser;
160 }
161
169 void
170 set_pulser(bool value)
171 {
172 std::lock_guard scoped_lock(m_mutex);
173 check();
174 clear();
175 p_obj.set_by_val(s_pulser, value);
176 }
177
178
186 uint8_t
188 {
189 std::lock_guard scoped_lock(m_mutex);
190 check();
191 check_init();
192 return m_detector_type;
193 }
194
202 void
203 set_detector_type(uint8_t value)
204 {
205 std::lock_guard scoped_lock(m_mutex);
206 check();
207 clear();
209 }
210
211
219 bool
221 {
222 std::lock_guard scoped_lock(m_mutex);
223 check();
224 check_init();
225 return m_adc_test_pattern;
226 }
227
235 void
237 {
238 std::lock_guard scoped_lock(m_mutex);
239 check();
240 clear();
242 }
243
244
245 // relationship names
246
247 inline static const std::string s_femb0 = "femb0";
248 inline static const std::string s_femb1 = "femb1";
249 inline static const std::string s_femb2 = "femb2";
250 inline static const std::string s_femb3 = "femb3";
251 inline static const std::string s_coldadc_settings = "coldadc_settings";
252 inline static const std::string s_wib_pulser = "wib_pulser";
253
254 static const std::string& __get_femb0_str() noexcept { return s_femb0; }
255 static const std::string& __get_femb1_str() noexcept { return s_femb1; }
256 static const std::string& __get_femb2_str() noexcept { return s_femb2; }
257 static const std::string& __get_femb3_str() noexcept { return s_femb3; }
258 static const std::string& __get_coldadc_settings_str() noexcept { return s_coldadc_settings; }
259 static const std::string& __get_wib_pulser_str() noexcept { return s_wib_pulser; }
260
261
270 get_femb0() const
271 {
272 std::lock_guard scoped_lock(m_mutex);
273 check();
274 check_init();
275 if (!m_femb0)
276 {
277 std::ostringstream text;
278 text << "relationship \"" << s_femb0 << "\" of object " << this << " is not set";
279 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
280 }
281 return m_femb0;
282 }
283
284
292 void
294
303 get_femb1() const
304 {
305 std::lock_guard scoped_lock(m_mutex);
306 check();
307 check_init();
308 if (!m_femb1)
309 {
310 std::ostringstream text;
311 text << "relationship \"" << s_femb1 << "\" of object " << this << " is not set";
312 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
313 }
314 return m_femb1;
315 }
316
317
325 void
327
336 get_femb2() const
337 {
338 std::lock_guard scoped_lock(m_mutex);
339 check();
340 check_init();
341 if (!m_femb2)
342 {
343 std::ostringstream text;
344 text << "relationship \"" << s_femb2 << "\" of object " << this << " is not set";
345 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
346 }
347 return m_femb2;
348 }
349
350
358 void
360
369 get_femb3() const
370 {
371 std::lock_guard scoped_lock(m_mutex);
372 check();
373 check_init();
374 if (!m_femb3)
375 {
376 std::ostringstream text;
377 text << "relationship \"" << s_femb3 << "\" of object " << this << " is not set";
378 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
379 }
380 return m_femb3;
381 }
382
383
391 void
393
403 {
404 std::lock_guard scoped_lock(m_mutex);
405 check();
406 check_init();
408 {
409 std::ostringstream text;
410 text << "relationship \"" << s_coldadc_settings << "\" of object " << this << " is not set";
411 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
412 }
413 return m_coldadc_settings;
414 }
415
416
424 void
426
436 {
437 std::lock_guard scoped_lock(m_mutex);
438 check();
439 check_init();
440 if (!m_wib_pulser)
441 {
442 std::ostringstream text;
443 text << "relationship \"" << s_wib_pulser << "\" of object " << this << " is not set";
444 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
445 }
446 return m_wib_pulser;
447 }
448
449
457 void
459
460 };
461
462 // out stream operator
463
464 inline std::ostream& operator<<(std::ostream& s, const WIBSettings& obj)
465 {
466 return obj.print_object(s);
467 }
468
469 typedef std::vector<const WIBSettings*>::const_iterator WIBSettingsIterator;
470
471 }
472}
473
474#endif
#define ERS_HERE
const dunedaq::appmodel::FEMBSettings * get_femb1() const
Get "femb1" relationship value. Settings for FEMB in slot 1.
void set_adc_test_pattern(bool value)
Set "adc_test_pattern" attribute value. True if the COLDADC test pattern should be enabled.
static const std::string & __get_wib_pulser_str() noexcept
bool get_pulser() const
Get "pulser" attribute value. True if the calibration pulser should be enabled.
const dunedaq::appmodel::FEMBSettings * get_femb2() const
Get "femb2" relationship value. Settings for FEMB in slot 2.
static const std::string s_pulser
static const std::string s_cold
void set_femb1(const dunedaq::appmodel::FEMBSettings *value)
Set "femb1" relationship value. Settings for FEMB in slot 1.
static const std::string s_detector_type
static const std::string s_coldadc_settings
const dunedaq::appmodel::FEMBSettings * get_femb0() const
Get "femb0" relationship value. Settings for FEMB in slot 0.
virtual ~WIBSettings() noexcept
static const std::string s_femb2
const dunedaq::appmodel::WIBPulserSettings * get_wib_pulser() const
Get "wib_pulser" relationship value. Settings for WIB pulser.
static const std::string s_femb0
static const std::string & __get_pulser_str() noexcept
void set_femb0(const dunedaq::appmodel::FEMBSettings *value)
Set "femb0" relationship value. Settings for FEMB in slot 0.
static const std::string s_femb1
static const std::string & __get_detector_type_str() noexcept
const dunedaq::appmodel::ColdADCSettings * m_coldadc_settings
uint8_t get_detector_type() const
Get "detector_type" attribute value. Detector type selector: WIB default (0), upper APA (1),...
friend class conffwk::DalFactory
static const std::string s_adc_test_pattern
const dunedaq::appmodel::FEMBSettings * m_femb0
static const std::string s_wib_pulser
void set_pulser(bool value)
Set "pulser" attribute value. True if the calibration pulser should be enabled.
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_femb3
static const std::string & __get_femb1_str() noexcept
const dunedaq::appmodel::FEMBSettings * m_femb1
static const std::string & __get_coldadc_settings_str() noexcept
const dunedaq::appmodel::FEMBSettings * m_femb2
void set_wib_pulser(const dunedaq::appmodel::WIBPulserSettings *value)
Set "wib_pulser" relationship value. Settings for WIB pulser.
static const std::string & __get_femb3_str() noexcept
bool get_adc_test_pattern() const
Get "adc_test_pattern" attribute value. True if the COLDADC test pattern should be enabled.
void set_detector_type(uint8_t value)
Set "detector_type" attribute value. Detector type selector: WIB default (0), upper APA (1),...
bool get_cold() const
Get "cold" attribute value. True if the front end electronics are COLD (77k)
friend class conffwk::DalObject
WIBSettings(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
static const std::string & __get_adc_test_pattern_str() noexcept
static const std::string & s_class_name
const dunedaq::appmodel::ColdADCSettings * get_coldadc_settings() const
Get "coldadc_settings" relationship value. Custom register settings for ColdADC.
const dunedaq::appmodel::WIBPulserSettings * m_wib_pulser
const dunedaq::appmodel::FEMBSettings * m_femb3
const dunedaq::appmodel::FEMBSettings * get_femb3() const
Get "femb3" relationship value. Settings for FEMB in slot 3.
void set_femb2(const dunedaq::appmodel::FEMBSettings *value)
Set "femb2" relationship value. Settings for FEMB in slot 2.
void set_coldadc_settings(const dunedaq::appmodel::ColdADCSettings *value)
Set "coldadc_settings" relationship value. Custom register settings for ColdADC.
static const std::string & __get_femb0_str() noexcept
virtual void init(bool init_children)
static const std::string & __get_femb2_str() noexcept
void set_femb3(const dunedaq::appmodel::FEMBSettings *value)
Set "femb3" relationship value. Settings for FEMB in slot 3.
void set_cold(bool value)
Set "cold" attribute value. True if the front end electronics are COLD (77k)
static const std::string & __get_cold_str() noexcept
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...
Generic configuration exception.
conffwk entry point
double offset
std::ostream & operator<<(std::ostream &s, const AVXAbsRunSumProcessor &obj)
std::vector< constWIBSettings * >::const_iterator WIBSettingsIterator
Including Qt Headers.