DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
StreamEmulationParameters.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _StreamEmulationParameters_0_dunedaq__appmodel_0_appmodel_H_
4#define _StreamEmulationParameters_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 ~StreamEmulationParameters() 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_data_file_name;
74 bool m_set_t0;
79
80
81 public:
82
83 // attribute names
84
85 inline static const std::string s_data_file_name = "data_file_name";
86 inline static const std::string s_tp_data_file_name = "tp_data_file_name";
87 inline static const std::string s_input_file_size_limit = "input_file_size_limit";
88 inline static const std::string s_set_t0 = "set_t0";
89 inline static const std::string s_random_population_size = "random_population_size";
90 inline static const std::string s_frame_error_rate_hz = "frame_error_rate_hz";
91 inline static const std::string s_generate_periodic_adc_pattern = "generate_periodic_adc_pattern";
92 inline static const std::string s_TP_rate_per_channel = "TP_rate_per_channel";
93
94 static const std::string& __get_data_file_name_str() noexcept { return s_data_file_name; }
95 static const std::string& __get_tp_data_file_name_str() noexcept { return s_tp_data_file_name; }
96 static const std::string& __get_input_file_size_limit_str() noexcept { return s_input_file_size_limit; }
97 static const std::string& __get_set_t0_str() noexcept { return s_set_t0; }
98 static const std::string& __get_random_population_size_str() noexcept { return s_random_population_size; }
99 static const std::string& __get_frame_error_rate_hz_str() noexcept { return s_frame_error_rate_hz; }
100 static const std::string& __get_generate_periodic_adc_pattern_str() noexcept { return s_generate_periodic_adc_pattern; }
101 static const std::string& __get_TP_rate_per_channel_str() noexcept { return s_TP_rate_per_channel; }
102
103
110 const std::string&
112 {
113 std::lock_guard scoped_lock(m_mutex);
114 check();
115 check_init();
116 return m_data_file_name;
117 }
118
125 void
126 set_data_file_name(const std::string& value)
127 {
128 std::lock_guard scoped_lock(m_mutex);
129 check();
130 clear();
132 }
133
134
141 const std::string&
143 {
144 std::lock_guard scoped_lock(m_mutex);
145 check();
146 check_init();
147 return m_tp_data_file_name;
148 }
149
156 void
157 set_tp_data_file_name(const std::string& value)
158 {
159 std::lock_guard scoped_lock(m_mutex);
160 check();
161 clear();
163 }
164
165
172 uint32_t
174 {
175 std::lock_guard scoped_lock(m_mutex);
176 check();
177 check_init();
179 }
180
187 void
189 {
190 std::lock_guard scoped_lock(m_mutex);
191 check();
192 clear();
194 }
195
196
204 bool
206 {
207 std::lock_guard scoped_lock(m_mutex);
208 check();
209 check_init();
210 return m_set_t0;
211 }
212
220 void
221 set_set_t0(bool value)
222 {
223 std::lock_guard scoped_lock(m_mutex);
224 check();
225 clear();
226 p_obj.set_by_val(s_set_t0, value);
227 }
228
229
236 uint32_t
238 {
239 std::lock_guard scoped_lock(m_mutex);
240 check();
241 check_init();
243 }
244
251 void
253 {
254 std::lock_guard scoped_lock(m_mutex);
255 check();
256 clear();
258 }
259
260
267 float
269 {
270 std::lock_guard scoped_lock(m_mutex);
271 check();
272 check_init();
274 }
275
282 void
284 {
285 std::lock_guard scoped_lock(m_mutex);
286 check();
287 clear();
289 }
290
291
298 bool
300 {
301 std::lock_guard scoped_lock(m_mutex);
302 check();
303 check_init();
305 }
306
313 void
315 {
316 std::lock_guard scoped_lock(m_mutex);
317 check();
318 clear();
320 }
321
322
330 float
332 {
333 std::lock_guard scoped_lock(m_mutex);
334 check();
335 check_init();
337 }
338
346 void
348 {
349 std::lock_guard scoped_lock(m_mutex);
350 check();
351 clear();
353 }
354
355
356 };
357
358 // out stream operator
359
360 inline std::ostream& operator<<(std::ostream& s, const StreamEmulationParameters& obj)
361 {
362 return obj.print_object(s);
363 }
364
365 typedef std::vector<const StreamEmulationParameters*>::const_iterator StreamEmulationParametersIterator;
366
367 }
368}
369
370#endif
uint32_t get_random_population_size() const
Get "random_population_size" attribute value.
bool get_generate_periodic_adc_pattern() const
Get "generate_periodic_adc_pattern" 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...
void set_tp_data_file_name(const std::string &value)
Set "tp_data_file_name" attribute value.
static const std::string & __get_tp_data_file_name_str() noexcept
void set_generate_periodic_adc_pattern(bool value)
Set "generate_periodic_adc_pattern" attribute value.
static const std::string & __get_random_population_size_str() noexcept
bool get_set_t0() const
Get "set_t0" attribute value. Set first timestamp to now.
static const std::string & __get_frame_error_rate_hz_str() noexcept
uint32_t get_input_file_size_limit() const
Get "input_file_size_limit" attribute value.
float get_frame_error_rate_hz() const
Get "frame_error_rate_hz" attribute value.
const std::string & get_data_file_name() const
Get "data_file_name" attribute value.
float get_TP_rate_per_channel() const
Get "TP_rate_per_channel" attribute value. TP rate per channel in units of 100 Hz.
const std::string & get_tp_data_file_name() const
Get "tp_data_file_name" attribute value.
void set_set_t0(bool value)
Set "set_t0" attribute value. Set first timestamp to now.
StreamEmulationParameters(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
void set_input_file_size_limit(uint32_t value)
Set "input_file_size_limit" attribute value.
void set_frame_error_rate_hz(float value)
Set "frame_error_rate_hz" attribute value.
void set_random_population_size(uint32_t value)
Set "random_population_size" attribute value.
static const std::string & __get_generate_periodic_adc_pattern_str() noexcept
static const std::string & __get_data_file_name_str() noexcept
static const std::string & __get_TP_rate_per_channel_str() noexcept
static const std::string & __get_input_file_size_limit_str() noexcept
static const std::string & __get_set_t0_str() noexcept
void set_data_file_name(const std::string &value)
Set "data_file_name" attribute value.
void set_TP_rate_per_channel(float value)
Set "TP_rate_per_channel" attribute value. TP rate per channel in units of 100 Hz.
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.
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< constStreamEmulationParameters * >::const_iterator StreamEmulationParametersIterator
Including Qt Headers.