DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
QueueDescriptor.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _QueueDescriptor_0_dunedaq__appmodel_0_appmodel_H_
4#define _QueueDescriptor_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 ~QueueDescriptor() 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 std::string m_uid_base;
72 std::string m_queue_type;
73 uint32_t m_capacity;
74 std::string m_data_type;
75
76
77 public:
78
79 // attribute names
80
81 inline static const std::string s_uid_base = "uid_base";
82 inline static const std::string s_queue_type = "queue_type";
83 inline static const std::string s_capacity = "capacity";
84 inline static const std::string s_data_type = "data_type";
85
86 static const std::string& __get_uid_base_str() noexcept { return s_uid_base; }
87 static const std::string& __get_queue_type_str() noexcept { return s_queue_type; }
88 static const std::string& __get_capacity_str() noexcept { return s_capacity; }
89 static const std::string& __get_data_type_str() noexcept { return s_data_type; }
90
91
99 const std::string&
101 {
102 std::lock_guard scoped_lock(m_mutex);
103 check();
104 check_init();
105 return m_uid_base;
106 }
107
115 void
116 set_uid_base(const std::string& value)
117 {
118 std::lock_guard scoped_lock(m_mutex);
119 check();
120 clear();
122 }
123
124
129 struct Queue_type {
130 inline static const std::string KUnknown = "kUnknown";
131 inline static const std::string KStdDeQueue = "kStdDeQueue";
132 inline static const std::string KFollySPSCQueue = "kFollySPSCQueue";
133 inline static const std::string KFollyMPMCQueue = "kFollyMPMCQueue";
134 };
135
143 const std::string&
145 {
146 std::lock_guard scoped_lock(m_mutex);
147 check();
148 check_init();
149 return m_queue_type;
150 }
151
159 void
160 set_queue_type(const std::string& value)
161 {
162 std::lock_guard scoped_lock(m_mutex);
163 check();
164 clear();
166 }
167
168
175 uint32_t
177 {
178 std::lock_guard scoped_lock(m_mutex);
179 check();
180 check_init();
181 return m_capacity;
182 }
183
190 void
191 set_capacity(uint32_t value)
192 {
193 std::lock_guard scoped_lock(m_mutex);
194 check();
195 clear();
197 }
198
199
207 const std::string&
209 {
210 std::lock_guard scoped_lock(m_mutex);
211 check();
212 check_init();
213 return m_data_type;
214 }
215
223 void
224 set_data_type(const std::string& value)
225 {
226 std::lock_guard scoped_lock(m_mutex);
227 check();
228 clear();
230 }
231
232
233 };
234
235 // out stream operator
236
237 inline std::ostream& operator<<(std::ostream& s, const QueueDescriptor& obj)
238 {
239 return obj.print_object(s);
240 }
241
242 typedef std::vector<const QueueDescriptor*>::const_iterator QueueDescriptorIterator;
243
244 }
245}
246
247#endif
QueueDescriptor(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
virtual ~QueueDescriptor() noexcept
static const std::string & __get_queue_type_str() noexcept
static const std::string & __get_data_type_str() noexcept
void set_uid_base(const std::string &value)
Set "uid_base" attribute value. Base for UID string. May be combined with a source id.
static const std::string s_capacity
const std::string & get_queue_type() const
Get "queue_type" attribute value. Type of queue.
void set_data_type(const std::string &value)
Set "data_type" attribute value. string identifying type of data transferred through this queue.
const std::string & get_data_type() const
Get "data_type" attribute value. string identifying type of data transferred through this queue.
static const std::string s_uid_base
uint32_t get_capacity() const
Get "capacity" attribute value.
static const std::string & __get_capacity_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...
virtual void init(bool init_children)
static const std::string & s_class_name
static const std::string s_queue_type
static const std::string s_data_type
void set_queue_type(const std::string &value)
Set "queue_type" attribute value. Type of queue.
void set_capacity(uint32_t value)
Set "capacity" attribute value.
const std::string & get_uid_base() const
Get "uid_base" attribute value. Base for UID string. May be combined with a source id.
static const std::string & __get_uid_base_str() noexcept
void set_by_val(const std::string &name, T value)
Set attribute value.
void set_by_ref(const std::string &name, T &value)
Set attribute value.
void set_enum(const std::string &name, const std::string &value)
Set attribute enumeration 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< constQueueDescriptor * >::const_iterator QueueDescriptorIterator
Including Qt Headers.