DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
ReversedListValidator.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _ReversedListValidator_0_dunedaq__listrev__dal_0_listrev_dal_H_
4#define _ReversedListValidator_0_dunedaq__listrev__dal_0_listrev_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
19
20 // forward declaration for classes used in relationships and algorithms
21
22namespace dunedaq {
23 namespace listrev {
24 namespace dal {
25 class RandomListGeneratorSet;
26 }
27 }
28}
29
30
31namespace dunedaq {
32 namespace listrev {
33 namespace dal {
34
35 class ReversedListValidator : public dunedaq::listrev::dal::ListRevModule {
36
38 friend class conffwk::DalObject;
39 friend class conffwk::DalFactory;
41
42 protected:
43
45 virtual ~ReversedListValidator() noexcept;
46 virtual void init(bool init_children);
47
48 public:
49
52 static const std::string& s_class_name;
53
54
64 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
65
66
76 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
77
78
79 protected:
80
81 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
82
83
84 private:
85
91
92
93 public:
94
95 // attribute names
96
97 inline static const std::string s_min_list_size = "min_list_size";
98 inline static const std::string s_max_list_size = "max_list_size";
99 inline static const std::string s_max_outstanding_requests = "max_outstanding_requests";
100 inline static const std::string s_request_rate_hz = "request_rate_hz";
101
102 static const std::string& __get_min_list_size_str() noexcept { return s_min_list_size; }
103 static const std::string& __get_max_list_size_str() noexcept { return s_max_list_size; }
104 static const std::string& __get_max_outstanding_requests_str() noexcept { return s_max_outstanding_requests; }
105 static const std::string& __get_request_rate_hz_str() noexcept { return s_request_rate_hz; }
106
107
114 uint32_t
116 {
117 std::lock_guard scoped_lock(m_mutex);
118 check();
119 check_init();
120 return m_min_list_size;
121 }
122
129 void
130 set_min_list_size(uint32_t value)
131 {
132 std::lock_guard scoped_lock(m_mutex);
133 check();
134 clear();
136 }
137
138
145 uint32_t
147 {
148 std::lock_guard scoped_lock(m_mutex);
149 check();
150 check_init();
151 return m_max_list_size;
152 }
153
160 void
161 set_max_list_size(uint32_t value)
162 {
163 std::lock_guard scoped_lock(m_mutex);
164 check();
165 clear();
167 }
168
169
176 uint32_t
178 {
179 std::lock_guard scoped_lock(m_mutex);
180 check();
181 check_init();
183 }
184
191 void
193 {
194 std::lock_guard scoped_lock(m_mutex);
195 check();
196 clear();
198 }
199
200
207 uint32_t
209 {
210 std::lock_guard scoped_lock(m_mutex);
211 check();
212 check_init();
213 return m_request_rate_hz;
214 }
215
222 void
223 set_request_rate_hz(uint32_t value)
224 {
225 std::lock_guard scoped_lock(m_mutex);
226 check();
227 clear();
229 }
230
231
232 // relationship names
233
234 inline static const std::string s_generatorSet = "generatorSet";
235
236 static const std::string& __get_generatorSet_str() noexcept { return s_generatorSet; }
237
238
248 {
249 std::lock_guard scoped_lock(m_mutex);
250 check();
251 check_init();
252 if (!m_generatorSet)
253 {
254 std::ostringstream text;
255 text << "relationship \"" << s_generatorSet << "\" of object " << this << " is not set";
256 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
257 }
258 return m_generatorSet;
259 }
260
261
269 void
271
272 };
273
274 // out stream operator
275
276 inline std::ostream& operator<<(std::ostream& s, const ReversedListValidator& obj)
277 {
278 return obj.print_object(s);
279 }
280
281 typedef std::vector<const ReversedListValidator*>::const_iterator ReversedListValidatorIterator;
282
283 }
284 }
285}
286
287#endif
#define ERS_HERE
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...
Generic configuration exception.
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...
uint32_t get_request_rate_hz() const
Get "request_rate_hz" attribute value.
uint32_t get_max_list_size() const
Get "max_list_size" attribute value.
static const std::string & __get_max_list_size_str() noexcept
void set_max_outstanding_requests(uint32_t value)
Set "max_outstanding_requests" attribute value.
static const std::string & __get_min_list_size_str() noexcept
void set_max_list_size(uint32_t value)
Set "max_list_size" attribute value.
void set_min_list_size(uint32_t value)
Set "min_list_size" attribute value.
static const std::string & __get_generatorSet_str() noexcept
ReversedListValidator(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
const dunedaq::listrev::dal::RandomListGeneratorSet * get_generatorSet() const
Get "generatorSet" relationship value. List of Random Data List Generators for this listrev complex.
uint32_t get_min_list_size() const
Get "min_list_size" attribute value.
void set_generatorSet(const dunedaq::listrev::dal::RandomListGeneratorSet *value)
Set "generatorSet" relationship value. List of Random Data List Generators for this listrev complex.
const dunedaq::listrev::dal::RandomListGeneratorSet * m_generatorSet
void set_request_rate_hz(uint32_t value)
Set "request_rate_hz" attribute value.
static const std::string & __get_max_outstanding_requests_str() noexcept
uint32_t get_max_outstanding_requests() const
Get "max_outstanding_requests" attribute value.
static const std::string & __get_request_rate_hz_str() noexcept
conffwk entry point
double offset
std::vector< constReversedListValidator * >::const_iterator ReversedListValidatorIterator
std::ostream & operator<<(std::ostream &s, const ListReverser &obj)
Including Qt Headers.