DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
DaphneV2PGA.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _DaphneV2PGA_0_dunedaq__appmodel_0_appmodel_H_
4#define _DaphneV2PGA_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
21
22 friend class conffwk::Configuration;
23 friend class conffwk::DalObject;
24 friend class conffwk::DalFactory;
25 friend class conffwk::DalRegistry;
26
27 protected:
28
30 virtual ~DaphneV2PGA() 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 uint8_t m_lpf_cut_frequency;
73 bool m_gain;
74
75
76 public:
77
78 // attribute names
79
80 inline static const std::string s_lpf_cut_frequency = "lpf_cut_frequency";
81 inline static const std::string s_integrator_disable = "integrator_disable";
82 inline static const std::string s_gain = "gain";
83
84 static const std::string& __get_lpf_cut_frequency_str() noexcept { return s_lpf_cut_frequency; }
85 static const std::string& __get_integrator_disable_str() noexcept { return s_integrator_disable; }
86 static const std::string& __get_gain_str() noexcept { return s_gain; }
87
88
96 uint8_t
98 {
99 std::lock_guard scoped_lock(m_mutex);
100 check();
101 check_init();
102 return m_lpf_cut_frequency;
103 }
104
112 void
114 {
115 std::lock_guard scoped_lock(m_mutex);
116 check();
117 clear();
119 }
120
121
128 bool
130 {
131 std::lock_guard scoped_lock(m_mutex);
132 check();
133 check_init();
135 }
136
143 void
145 {
146 std::lock_guard scoped_lock(m_mutex);
147 check();
148 clear();
150 }
151
152
160 bool
161 get_gain() const
162 {
163 std::lock_guard scoped_lock(m_mutex);
164 check();
165 check_init();
166 return m_gain;
167 }
168
176 void
177 set_gain(bool value)
178 {
179 std::lock_guard scoped_lock(m_mutex);
180 check();
181 clear();
182 p_obj.set_by_val(s_gain, value);
183 }
184
185
186
187 public:
188
189 // user-defined algorithms
190
195 uint16_t get_reg51() const;
196 };
197
198 // out stream operator
199
200 inline std::ostream& operator<<(std::ostream& s, const DaphneV2PGA& obj)
201 {
202 return obj.print_object(s);
203 }
204
205 typedef std::vector<const DaphneV2PGA*>::const_iterator DaphneV2PGAIterator;
206
207 }
208}
209
210#endif
bool get_integrator_disable() const
Get "integrator_disable" attribute value.
uint8_t get_lpf_cut_frequency() const
Get "lpf_cut_frequency" attribute value. cut frequency, only 4 values acceptable. 0=15MHz,...
void set_lpf_cut_frequency(uint8_t value)
Set "lpf_cut_frequency" attribute value. cut frequency, only 4 values acceptable. 0=15MHz,...
void set_gain(bool value)
Set "gain" attribute value. rue=30 dB, false=24 dB.
virtual ~DaphneV2PGA() noexcept
static const std::string s_integrator_disable
DaphneV2PGA(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
static const std::string & s_class_name
static const std::string & __get_gain_str() noexcept
virtual void init(bool init_children)
friend class conffwk::DalFactory
static const std::string s_lpf_cut_frequency
static const std::string & __get_lpf_cut_frequency_str() noexcept
friend class conffwk::DalObject
static const std::string s_gain
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 & __get_integrator_disable_str() noexcept
bool get_gain() const
Get "gain" attribute value. rue=30 dB, false=24 dB.
void set_integrator_disable(bool value)
Set "integrator_disable" attribute value.
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< constDaphneV2PGA * >::const_iterator DaphneV2PGAIterator
Including Qt Headers.