DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
FEMBSettings.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _FEMBSettings_0_dunedaq__appmodel_0_appmodel_H_
4#define _FEMBSettings_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 FEMBSettings : public virtual dunedaq::conffwk::DalObject {
21
23 friend class conffwk::DalObject;
24 friend class conffwk::DalFactory;
26
27 protected:
28
30 virtual ~FEMBSettings() 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
73 uint8_t m_gain;
74 uint8_t m_peak_time;
75 uint8_t m_baseline;
76 uint8_t m_pulse_dac;
78 uint8_t m_leak;
81 uint8_t m_buffering;
85 std::vector<uint8_t> m_line_driver;
86 std::vector<bool> m_pulse_channels;
87
88
89 public:
90
91 // attribute names
92
93 inline static const std::string s_enabled = "enabled";
94 inline static const std::string s_test_cap = "test_cap";
95 inline static const std::string s_gain = "gain";
96 inline static const std::string s_peak_time = "peak_time";
97 inline static const std::string s_baseline = "baseline";
98 inline static const std::string s_pulse_dac = "pulse_dac";
99 inline static const std::string s_gain_match = "gain_match";
100 inline static const std::string s_leak = "leak";
101 inline static const std::string s_leak_10x = "leak_10x";
102 inline static const std::string s_ac_couple = "ac_couple";
103 inline static const std::string s_buffering = "buffering";
104 inline static const std::string s_strobe_skip = "strobe_skip";
105 inline static const std::string s_strobe_delay = "strobe_delay";
106 inline static const std::string s_strobe_length = "strobe_length";
107 inline static const std::string s_line_driver = "line_driver";
108 inline static const std::string s_pulse_channels = "pulse_channels";
109
110 static const std::string& __get_enabled_str() noexcept { return s_enabled; }
111 static const std::string& __get_test_cap_str() noexcept { return s_test_cap; }
112 static const std::string& __get_gain_str() noexcept { return s_gain; }
113 static const std::string& __get_peak_time_str() noexcept { return s_peak_time; }
114 static const std::string& __get_baseline_str() noexcept { return s_baseline; }
115 static const std::string& __get_pulse_dac_str() noexcept { return s_pulse_dac; }
116 static const std::string& __get_gain_match_str() noexcept { return s_gain_match; }
117 static const std::string& __get_leak_str() noexcept { return s_leak; }
118 static const std::string& __get_leak_10x_str() noexcept { return s_leak_10x; }
119 static const std::string& __get_ac_couple_str() noexcept { return s_ac_couple; }
120 static const std::string& __get_buffering_str() noexcept { return s_buffering; }
121 static const std::string& __get_strobe_skip_str() noexcept { return s_strobe_skip; }
122 static const std::string& __get_strobe_delay_str() noexcept { return s_strobe_delay; }
123 static const std::string& __get_strobe_length_str() noexcept { return s_strobe_length; }
124 static const std::string& __get_line_driver_str() noexcept { return s_line_driver; }
125 static const std::string& __get_pulse_channels_str() noexcept { return s_pulse_channels; }
126
127
135 bool
137 {
138 std::lock_guard scoped_lock(m_mutex);
139 check();
140 check_init();
141 return m_enabled;
142 }
143
151 void
152 set_enabled(bool value)
153 {
154 std::lock_guard scoped_lock(m_mutex);
155 check();
156 clear();
157 p_obj.set_by_val(s_enabled, value);
158 }
159
160
168 bool
170 {
171 std::lock_guard scoped_lock(m_mutex);
172 check();
173 check_init();
174 return m_test_cap;
175 }
176
184 void
185 set_test_cap(bool value)
186 {
187 std::lock_guard scoped_lock(m_mutex);
188 check();
189 clear();
191 }
192
193
201 uint8_t
202 get_gain() const
203 {
204 std::lock_guard scoped_lock(m_mutex);
205 check();
206 check_init();
207 return m_gain;
208 }
209
217 void
218 set_gain(uint8_t value)
219 {
220 std::lock_guard scoped_lock(m_mutex);
221 check();
222 clear();
223 p_obj.set_by_val(s_gain, value);
224 }
225
226
234 uint8_t
236 {
237 std::lock_guard scoped_lock(m_mutex);
238 check();
239 check_init();
240 return m_peak_time;
241 }
242
250 void
251 set_peak_time(uint8_t value)
252 {
253 std::lock_guard scoped_lock(m_mutex);
254 check();
255 clear();
257 }
258
259
267 uint8_t
269 {
270 std::lock_guard scoped_lock(m_mutex);
271 check();
272 check_init();
273 return m_baseline;
274 }
275
283 void
284 set_baseline(uint8_t value)
285 {
286 std::lock_guard scoped_lock(m_mutex);
287 check();
288 clear();
290 }
291
292
300 uint8_t
302 {
303 std::lock_guard scoped_lock(m_mutex);
304 check();
305 check_init();
306 return m_pulse_dac;
307 }
308
316 void
317 set_pulse_dac(uint8_t value)
318 {
319 std::lock_guard scoped_lock(m_mutex);
320 check();
321 clear();
323 }
324
325
333 bool
335 {
336 std::lock_guard scoped_lock(m_mutex);
337 check();
338 check_init();
339 return m_gain_match;
340 }
341
349 void
350 set_gain_match(bool value)
351 {
352 std::lock_guard scoped_lock(m_mutex);
353 check();
354 clear();
356 }
357
358
366 uint8_t
367 get_leak() const
368 {
369 std::lock_guard scoped_lock(m_mutex);
370 check();
371 check_init();
372 return m_leak;
373 }
374
382 void
383 set_leak(uint8_t value)
384 {
385 std::lock_guard scoped_lock(m_mutex);
386 check();
387 clear();
388 p_obj.set_by_val(s_leak, value);
389 }
390
391
399 bool
401 {
402 std::lock_guard scoped_lock(m_mutex);
403 check();
404 check_init();
405 return m_leak_10x;
406 }
407
415 void
416 set_leak_10x(bool value)
417 {
418 std::lock_guard scoped_lock(m_mutex);
419 check();
420 clear();
422 }
423
424
432 bool
434 {
435 std::lock_guard scoped_lock(m_mutex);
436 check();
437 check_init();
438 return m_ac_couple;
439 }
440
448 void
449 set_ac_couple(bool value)
450 {
451 std::lock_guard scoped_lock(m_mutex);
452 check();
453 clear();
455 }
456
457
465 uint8_t
467 {
468 std::lock_guard scoped_lock(m_mutex);
469 check();
470 check_init();
471 return m_buffering;
472 }
473
481 void
482 set_buffering(uint8_t value)
483 {
484 std::lock_guard scoped_lock(m_mutex);
485 check();
486 clear();
488 }
489
490
498 uint8_t
500 {
501 std::lock_guard scoped_lock(m_mutex);
502 check();
503 check_init();
504 return m_strobe_skip;
505 }
506
514 void
515 set_strobe_skip(uint8_t value)
516 {
517 std::lock_guard scoped_lock(m_mutex);
518 check();
519 clear();
521 }
522
523
531 uint8_t
533 {
534 std::lock_guard scoped_lock(m_mutex);
535 check();
536 check_init();
537 return m_strobe_delay;
538 }
539
547 void
548 set_strobe_delay(uint8_t value)
549 {
550 std::lock_guard scoped_lock(m_mutex);
551 check();
552 clear();
554 }
555
556
564 uint8_t
566 {
567 std::lock_guard scoped_lock(m_mutex);
568 check();
569 check_init();
570 return m_strobe_length;
571 }
572
580 void
581 set_strobe_length(uint8_t value)
582 {
583 std::lock_guard scoped_lock(m_mutex);
584 check();
585 clear();
587 }
588
589
597 const std::vector<uint8_t>&
599 {
600 std::lock_guard scoped_lock(m_mutex);
601 check();
602 check_init();
603 return m_line_driver;
604 }
605
613 void
614 set_line_driver(const std::vector<uint8_t>& value)
615 {
616 std::lock_guard scoped_lock(m_mutex);
617 check();
618 clear();
620 }
621
622
630 const std::vector<bool>&
632 {
633 std::lock_guard scoped_lock(m_mutex);
634 check();
635 check_init();
636 return m_pulse_channels;
637 }
638
646 void
647 set_pulse_channels(const std::vector<bool>& value)
648 {
649 std::lock_guard scoped_lock(m_mutex);
650 check();
651 clear();
653 }
654
655
656 };
657
658 // out stream operator
659
660 inline std::ostream& operator<<(std::ostream& s, const FEMBSettings& obj)
661 {
662 return obj.print_object(s);
663 }
664
665 typedef std::vector<const FEMBSettings*>::const_iterator FEMBSettingsIterator;
666
667 }
668}
669
670#endif
void set_strobe_length(uint8_t value)
Set "strobe_length" attribute value. Length of strobe in 64MHz periods (pulser length 0-255)
void set_pulse_dac(uint8_t value)
Set "pulse_dac" attribute value. Pulser DAC setting [0-63].
static const std::string & __get_strobe_delay_str() noexcept
static const std::string s_peak_time
static const std::string & __get_gain_str() noexcept
static const std::string & __get_pulse_channels_str() noexcept
uint8_t get_peak_time() const
Get "peak_time" attribute value. Channel peak time selector: 1.0, 0.5, 3, 2 us (0 - 3)
bool get_ac_couple() const
Get "ac_couple" attribute value. false (DC coupling), true (AC coupling)
static const std::string s_buffering
static const std::string & __get_ac_couple_str() noexcept
const std::vector< bool > & get_pulse_channels() const
Get "pulse_channels" attribute value. Array of up to 16 true/false values, for whether to send pulser...
std::vector< bool > m_pulse_channels
std::vector< uint8_t > m_line_driver
bool get_leak_10x() const
Get "leak_10x" attribute value. Multiply leak current by 10 if true.
void set_peak_time(uint8_t value)
Set "peak_time" attribute value. Channel peak time selector: 1.0, 0.5, 3, 2 us (0 - 3)
FEMBSettings(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
static const std::string s_baseline
static const std::string & __get_pulse_dac_str() noexcept
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_leak
void set_line_driver(const std::vector< uint8_t > &value)
Set "line_driver" attribute value. 0 (Default), 1 (Short), 2 (25 m warm), 3 (35 m warm),...
uint8_t get_strobe_delay() const
Get "strobe_delay" attribute value. 64MHz periods to skip after 2MHz edge for strobe (pulser offset 0...
void set_buffering(uint8_t value)
Set "buffering" attribute value. 0 (no buffer), 1 (se buffer), 2 (sedc buffer)
bool get_test_cap() const
Get "test_cap" attribute value. Enable the test capacitor.
bool get_gain_match() const
Get "gain_match" attribute value. Enable pulser DAC gain matching.
static const std::string & __get_buffering_str() noexcept
static const std::string s_leak_10x
static const std::string s_pulse_dac
void set_leak_10x(bool value)
Set "leak_10x" attribute value. Multiply leak current by 10 if true.
uint8_t get_baseline() const
Get "baseline" attribute value. Baseline selector: 0 (900 mV), 1 (200 mV), 2 (200 mV collection,...
static const std::string s_strobe_delay
uint8_t get_strobe_length() const
Get "strobe_length" attribute value. Length of strobe in 64MHz periods (pulser length 0-255)
static const std::string s_strobe_length
static const std::string & __get_strobe_skip_str() noexcept
static const std::string & __get_strobe_length_str() noexcept
static const std::string s_strobe_skip
uint8_t get_gain() const
Get "gain" attribute value. Channel gain selector: 14, 25, 7.8, 4.7 mV/fC (0 - 3)
const std::vector< uint8_t > & get_line_driver() const
Get "line_driver" attribute value. 0 (Default), 1 (Short), 2 (25 m warm), 3 (35 m warm),...
void set_gain(uint8_t value)
Set "gain" attribute value. Channel gain selector: 14, 25, 7.8, 4.7 mV/fC (0 - 3)
friend class conffwk::DalFactory
static const std::string & __get_enabled_str() noexcept
void set_strobe_delay(uint8_t value)
Set "strobe_delay" attribute value. 64MHz periods to skip after 2MHz edge for strobe (pulser offset 0...
virtual void init(bool init_children)
static const std::string & __get_gain_match_str() noexcept
static const std::string & s_class_name
static const std::string & __get_leak_str() noexcept
uint8_t get_leak() const
Get "leak" attribute value. Leak current selector: 0 (500 pA), 1 (100 pA)
static const std::string s_enabled
static const std::string s_ac_couple
static const std::string s_pulse_channels
void set_gain_match(bool value)
Set "gain_match" attribute value. Enable pulser DAC gain matching.
uint8_t get_strobe_skip() const
Get "strobe_skip" attribute value. 2MHz periods to skip after strobe (pulser period 0-255)
static const std::string & __get_test_cap_str() noexcept
uint8_t get_pulse_dac() const
Get "pulse_dac" attribute value. Pulser DAC setting [0-63].
void set_leak(uint8_t value)
Set "leak" attribute value. Leak current selector: 0 (500 pA), 1 (100 pA)
static const std::string & __get_leak_10x_str() noexcept
static const std::string s_gain_match
friend class conffwk::DalObject
void set_baseline(uint8_t value)
Set "baseline" attribute value. Baseline selector: 0 (900 mV), 1 (200 mV), 2 (200 mV collection,...
static const std::string s_test_cap
static const std::string s_line_driver
void set_test_cap(bool value)
Set "test_cap" attribute value. Enable the test capacitor.
void set_pulse_channels(const std::vector< bool > &value)
Set "pulse_channels" attribute value. Array of up to 16 true/false values, for whether to send pulser...
uint8_t get_buffering() const
Get "buffering" attribute value. 0 (no buffer), 1 (se buffer), 2 (sedc buffer)
static const std::string & __get_line_driver_str() noexcept
static const std::string & __get_peak_time_str() noexcept
void set_strobe_skip(uint8_t value)
Set "strobe_skip" attribute value. 2MHz periods to skip after strobe (pulser period 0-255)
static const std::string s_gain
static const std::string & __get_baseline_str() noexcept
void set_ac_couple(bool value)
Set "ac_couple" attribute value. false (DC coupling), true (AC coupling)
void set_enabled(bool value)
Set "enabled" attribute value. True of FEMB should be configured and read out by WIB.
bool get_enabled() const
Get "enabled" attribute value. True of FEMB should be configured and read out by WIB.
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::ostream & operator<<(std::ostream &s, const AVXAbsRunSumProcessor &obj)
std::vector< constFEMBSettings * >::const_iterator FEMBSettingsIterator
Including Qt Headers.