DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
DaphneV2LNA.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _DaphneV2LNA_0_dunedaq__appmodel_0_appmodel_H_
4#define _DaphneV2LNA_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 ~DaphneV2LNA() 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 uint8_t m_clamp;
77 uint8_t m_gain;
78
79
80 public:
81
82 // attribute names
83
84 inline static const std::string s_clamp = "clamp";
85 inline static const std::string s_integrator_disable = "integrator_disable";
86 inline static const std::string s_gain = "gain";
87
88 static const std::string& __get_clamp_str() noexcept { return s_clamp; }
89 static const std::string& __get_integrator_disable_str() noexcept { return s_integrator_disable; }
90 static const std::string& __get_gain_str() noexcept { return s_gain; }
91
92
100 uint8_t
101 get_clamp() const
102 {
103 std::lock_guard scoped_lock(m_mutex);
104 check();
105 check_init();
106 return m_clamp;
107 }
108
116 void
117 set_clamp(uint8_t value)
118 {
119 std::lock_guard scoped_lock(m_mutex);
120 check();
121 clear();
122 p_obj.set_by_val(s_clamp, value);
123 }
124
125
132 bool
134 {
135 std::lock_guard scoped_lock(m_mutex);
136 check();
137 check_init();
139 }
140
147 void
149 {
150 std::lock_guard scoped_lock(m_mutex);
151 check();
152 clear();
154 }
155
156
164 uint8_t
165 get_gain() const
166 {
167 std::lock_guard scoped_lock(m_mutex);
168 check();
169 check_init();
170 return m_gain;
171 }
172
180 void
181 set_gain(uint8_t value)
182 {
183 std::lock_guard scoped_lock(m_mutex);
184 check();
185 clear();
186 p_obj.set_by_val(s_gain, value);
187 }
188
189
190
191 public:
192
193 // user-defined algorithms
194
199 uint16_t get_reg52() const;
200 };
201
202 // out stream operator
203
204 inline std::ostream& operator<<(std::ostream& s, const DaphneV2LNA& obj)
205 {
206 return obj.print_object(s);
207 }
208
209 typedef std::vector<const DaphneV2LNA*>::const_iterator DaphneV2LNAIterator;
210
211 }
212}
213
214#endif
static const std::string & __get_integrator_disable_str() noexcept
virtual void init(bool init_children)
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...
DaphneV2LNA(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
static const std::string & s_class_name
static const std::string & __get_gain_str() noexcept
static const std::string s_gain
friend class conffwk::DalFactory
static const std::string s_integrator_disable
bool get_integrator_disable() const
Get "integrator_disable" attribute value.
virtual ~DaphneV2LNA() noexcept
static const std::string & __get_clamp_str() noexcept
static const std::string s_clamp
void set_gain(uint8_t value)
Set "gain" attribute value. 0=18 dB, 1=24 dB, 2=12 dB.
friend class conffwk::DalObject
void set_clamp(uint8_t value)
Set "clamp" attribute value. 0=auto setting, 1=1.5 Vpp, 2=1.15 Vpp, 3=0.6 Vpp.
uint8_t get_clamp() const
Get "clamp" attribute value. 0=auto setting, 1=1.5 Vpp, 2=1.15 Vpp, 3=0.6 Vpp.
void set_integrator_disable(bool value)
Set "integrator_disable" attribute value.
uint8_t get_gain() const
Get "gain" attribute value. 0=18 dB, 1=24 dB, 2=12 dB.
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< constDaphneV2LNA * >::const_iterator DaphneV2LNAIterator
Including Qt Headers.