DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
HSIControllerConf.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _HSIControllerConf_0_dunedaq__hsilibs__dal_0_hsilibs_dal_H_
4#define _HSIControllerConf_0_dunedaq__hsilibs__dal_0_hsilibs_dal_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 // include files for classes used in inheritance hierarchy
17
20
21namespace dunedaq {
22 namespace hsilibs {
23 namespace dal {
24
26
28 friend class conffwk::DalObject;
29 friend class conffwk::DalFactory;
31
32 protected:
33
35 virtual ~HSIControllerConf() noexcept;
36 virtual void init(bool init_children);
37
38 public:
39
42 static const std::string& s_class_name;
43
44
54 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
55
56
66 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
67
68
69 protected:
70
71 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
72
73
74 private:
75
81 uint32_t m_data_source;
82
83
84 public:
85
86 // attribute names
87
88 inline static const std::string s_trigger_rate = "trigger_rate";
89 inline static const std::string s_control_hardware_io = "control_hardware_io";
90 inline static const std::string s_rising_edge_mask = "rising_edge_mask";
91 inline static const std::string s_falling_edge_mask = "falling_edge_mask";
92 inline static const std::string s_invert_edge_mask = "invert_edge_mask";
93 inline static const std::string s_data_source = "data_source";
94
95 static const std::string& __get_trigger_rate_str() noexcept { return s_trigger_rate; }
96 static const std::string& __get_control_hardware_io_str() noexcept { return s_control_hardware_io; }
97 static const std::string& __get_rising_edge_mask_str() noexcept { return s_rising_edge_mask; }
98 static const std::string& __get_falling_edge_mask_str() noexcept { return s_falling_edge_mask; }
99 static const std::string& __get_invert_edge_mask_str() noexcept { return s_invert_edge_mask; }
100 static const std::string& __get_data_source_str() noexcept { return s_data_source; }
101
102
109 double
111 {
112 std::lock_guard scoped_lock(m_mutex);
113 check();
114 check_init();
115 return m_trigger_rate;
116 }
117
124 void
125 set_trigger_rate(double value)
126 {
127 std::lock_guard scoped_lock(m_mutex);
128 check();
129 clear();
131 }
132
133
141 bool
143 {
144 std::lock_guard scoped_lock(m_mutex);
145 check();
146 check_init();
148 }
149
157 void
159 {
160 std::lock_guard scoped_lock(m_mutex);
161 check();
162 clear();
164 }
165
166
174 uint32_t
176 {
177 std::lock_guard scoped_lock(m_mutex);
178 check();
179 check_init();
180 return m_rising_edge_mask;
181 }
182
190 void
191 set_rising_edge_mask(uint32_t value)
192 {
193 std::lock_guard scoped_lock(m_mutex);
194 check();
195 clear();
197 }
198
199
207 uint32_t
209 {
210 std::lock_guard scoped_lock(m_mutex);
211 check();
212 check_init();
213 return m_falling_edge_mask;
214 }
215
223 void
224 set_falling_edge_mask(uint32_t value)
225 {
226 std::lock_guard scoped_lock(m_mutex);
227 check();
228 clear();
230 }
231
232
240 uint32_t
242 {
243 std::lock_guard scoped_lock(m_mutex);
244 check();
245 check_init();
246 return m_invert_edge_mask;
247 }
248
256 void
257 set_invert_edge_mask(uint32_t value)
258 {
259 std::lock_guard scoped_lock(m_mutex);
260 check();
261 clear();
263 }
264
265
273 uint32_t
275 {
276 std::lock_guard scoped_lock(m_mutex);
277 check();
278 check_init();
279 return m_data_source;
280 }
281
289 void
290 set_data_source(uint32_t value)
291 {
292 std::lock_guard scoped_lock(m_mutex);
293 check();
294 clear();
296 }
297
298
299 };
300
301 // out stream operator
302
303 inline std::ostream& operator<<(std::ostream& s, const HSIControllerConf& obj)
304 {
305 return obj.print_object(s);
306 }
307
308 typedef std::vector<const HSIControllerConf*>::const_iterator HSIControllerConfIterator;
309
310 }
311 }
312}
313
314#endif
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...
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_control_hardware_io_str() noexcept
static const std::string & __get_falling_edge_mask_str() noexcept
double get_trigger_rate() const
Get "trigger_rate" attribute value.
uint32_t get_invert_edge_mask() const
Get "invert_edge_mask" attribute value. Invert edge mask for HSI triggering.
uint32_t get_data_source() const
Get "data_source" attribute value. Source of data for HSI triggering.
void set_rising_edge_mask(uint32_t value)
Set "rising_edge_mask" attribute value. Rising edge mask for HSI triggering.
static const std::string & __get_data_source_str() noexcept
static const std::string & __get_rising_edge_mask_str() noexcept
void set_data_source(uint32_t value)
Set "data_source" attribute value. Source of data for HSI triggering.
bool get_control_hardware_io() const
Get "control_hardware_io" attribute value. control flag for controlling hardware io.
static const std::string & __get_invert_edge_mask_str() noexcept
void set_falling_edge_mask(uint32_t value)
Set "falling_edge_mask" attribute value. Falling edge mask for HSI triggering.
uint32_t get_falling_edge_mask() const
Get "falling_edge_mask" attribute value. Falling edge mask for HSI triggering.
static const std::string & __get_trigger_rate_str() noexcept
uint32_t get_rising_edge_mask() const
Get "rising_edge_mask" attribute value. Rising edge mask for HSI triggering.
virtual void init(bool init_children)
HSIControllerConf(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
void set_control_hardware_io(bool value)
Set "control_hardware_io" attribute value. control flag for controlling hardware io.
void set_trigger_rate(double value)
Set "trigger_rate" attribute value.
void set_invert_edge_mask(uint32_t value)
Set "invert_edge_mask" attribute value. Invert edge mask for HSI triggering.
conffwk entry point
double offset
std::vector< constHSIControllerConf * >::const_iterator HSIControllerConfIterator
std::ostream & operator<<(std::ostream &s, const HSIController &obj)
Including Qt Headers.