DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
LatencyBuffer.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _LatencyBuffer_0_dunedaq__appmodel_0_appmodel_H_
4#define _LatencyBuffer_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 LatencyBuffer : public virtual dunedaq::conffwk::DalObject {
21
23 friend class conffwk::DalObject;
24 friend class conffwk::DalFactory;
26
27 protected:
28
30 virtual ~LatencyBuffer() 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 uint32_t m_size;
73 int16_t m_numa_node;
77
78
79 public:
80
81 // attribute names
82
83 inline static const std::string s_size = "size";
84 inline static const std::string s_numa_aware = "numa_aware";
85 inline static const std::string s_numa_node = "numa_node";
86 inline static const std::string s_intrinsic_allocator = "intrinsic_allocator";
87 inline static const std::string s_alignment_size = "alignment_size";
88 inline static const std::string s_preallocation = "preallocation";
89
90 static const std::string& __get_size_str() noexcept { return s_size; }
91 static const std::string& __get_numa_aware_str() noexcept { return s_numa_aware; }
92 static const std::string& __get_numa_node_str() noexcept { return s_numa_node; }
93 static const std::string& __get_intrinsic_allocator_str() noexcept { return s_intrinsic_allocator; }
94 static const std::string& __get_alignment_size_str() noexcept { return s_alignment_size; }
95 static const std::string& __get_preallocation_str() noexcept { return s_preallocation; }
96
97
104 uint32_t
105 get_size() const
106 {
107 std::lock_guard scoped_lock(m_mutex);
108 check();
109 check_init();
110 return m_size;
111 }
112
119 void
120 set_size(uint32_t value)
121 {
122 std::lock_guard scoped_lock(m_mutex);
123 check();
124 clear();
125 p_obj.set_by_val(s_size, value);
126 }
127
128
135 bool
137 {
138 std::lock_guard scoped_lock(m_mutex);
139 check();
140 check_init();
141 return m_numa_aware;
142 }
143
150 void
151 set_numa_aware(bool value)
152 {
153 std::lock_guard scoped_lock(m_mutex);
154 check();
155 clear();
157 }
158
159
166 int16_t
168 {
169 std::lock_guard scoped_lock(m_mutex);
170 check();
171 check_init();
172 return m_numa_node;
173 }
174
181 void
182 set_numa_node(int16_t value)
183 {
184 std::lock_guard scoped_lock(m_mutex);
185 check();
186 clear();
188 }
189
190
197 bool
199 {
200 std::lock_guard scoped_lock(m_mutex);
201 check();
202 check_init();
204 }
205
212 void
214 {
215 std::lock_guard scoped_lock(m_mutex);
216 check();
217 clear();
219 }
220
221
228 uint32_t
230 {
231 std::lock_guard scoped_lock(m_mutex);
232 check();
233 check_init();
234 return m_alignment_size;
235 }
236
243 void
244 set_alignment_size(uint32_t value)
245 {
246 std::lock_guard scoped_lock(m_mutex);
247 check();
248 clear();
250 }
251
252
259 bool
261 {
262 std::lock_guard scoped_lock(m_mutex);
263 check();
264 check_init();
265 return m_preallocation;
266 }
267
274 void
276 {
277 std::lock_guard scoped_lock(m_mutex);
278 check();
279 clear();
281 }
282
283
284 };
285
286 // out stream operator
287
288 inline std::ostream& operator<<(std::ostream& s, const LatencyBuffer& obj)
289 {
290 return obj.print_object(s);
291 }
292
293 typedef std::vector<const LatencyBuffer*>::const_iterator LatencyBufferIterator;
294
295 }
296}
297
298#endif
LatencyBuffer(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
void set_intrinsic_allocator(bool value)
Set "intrinsic_allocator" attribute value.
static const std::string & __get_numa_node_str() noexcept
uint32_t get_alignment_size() const
Get "alignment_size" attribute value.
void set_size(uint32_t value)
Set "size" attribute value.
static const std::string & __get_preallocation_str() noexcept
static const std::string s_intrinsic_allocator
void set_numa_node(int16_t value)
Set "numa_node" attribute value.
void set_alignment_size(uint32_t value)
Set "alignment_size" attribute value.
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_size_str() noexcept
virtual void init(bool init_children)
static const std::string & __get_numa_aware_str() noexcept
static const std::string s_size
static const std::string & s_class_name
static const std::string & __get_alignment_size_str() noexcept
bool get_preallocation() const
Get "preallocation" attribute value.
static const std::string s_numa_aware
friend class conffwk::DalFactory
int16_t get_numa_node() const
Get "numa_node" attribute value.
void set_preallocation(bool value)
Set "preallocation" attribute value.
static const std::string s_alignment_size
uint32_t get_size() const
Get "size" attribute value.
static const std::string & __get_intrinsic_allocator_str() noexcept
void set_numa_aware(bool value)
Set "numa_aware" attribute value.
friend class conffwk::DalObject
bool get_intrinsic_allocator() const
Get "intrinsic_allocator" attribute value.
static const std::string s_numa_node
bool get_numa_aware() const
Get "numa_aware" attribute value.
static const std::string s_preallocation
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< constLatencyBuffer * >::const_iterator LatencyBufferIterator
Including Qt Headers.
FELIX Initialization std::string initerror FELIX queue timed std::string queuename Unexpected chunk size