DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
RandomTCMakerConf.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _RandomTCMakerConf_0_dunedaq__appmodel_0_appmodel_H_
4#define _RandomTCMakerConf_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 // include files for classes used in inheritance hierarchy
17
19
20namespace dunedaq {
21 namespace appmodel {
22
23 class RandomTCMakerConf : public dunedaq::appmodel::StandaloneTCMakerConf {
24
26 friend class conffwk::DalObject;
27 friend class conffwk::DalFactory;
29
30 protected:
31
33 virtual ~RandomTCMakerConf() noexcept;
34 virtual void init(bool init_children);
35
36 public:
37
40 static const std::string& s_class_name;
41
42
52 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
53
54
64 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
65
66
67 protected:
68
69 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
70
71
72 private:
73
81
82
83 public:
84
85 // attribute names
86
87 inline static const std::string s_template_for = "template_for";
88 inline static const std::string s_trigger_rate_hz = "trigger_rate_hz";
89 inline static const std::string s_time_distribution = "time_distribution";
90 inline static const std::string s_candidate_type_name = "candidate_type_name";
91 inline static const std::string s_candidate_backshift_ts = "candidate_backshift_ts";
92 inline static const std::string s_candidate_window_before_ts = "candidate_window_before_ts";
93 inline static const std::string s_candidate_window_after_ts = "candidate_window_after_ts";
94
95 static const std::string& __get_template_for_str() noexcept { return s_template_for; }
96 static const std::string& __get_trigger_rate_hz_str() noexcept { return s_trigger_rate_hz; }
97 static const std::string& __get_time_distribution_str() noexcept { return s_time_distribution; }
98 static const std::string& __get_candidate_type_name_str() noexcept { return s_candidate_type_name; }
99 static const std::string& __get_candidate_backshift_ts_str() noexcept { return s_candidate_backshift_ts; }
100 static const std::string& __get_candidate_window_before_ts_str() noexcept { return s_candidate_window_before_ts; }
101 static const std::string& __get_candidate_window_after_ts_str() noexcept { return s_candidate_window_after_ts; }
102
103
110 const std::string&
112 {
113 std::lock_guard scoped_lock(m_mutex);
114 check();
115 check_init();
116 return m_template_for;
117 }
118
125 void
126 set_template_for(const std::string& value)
127 {
128 std::lock_guard scoped_lock(m_mutex);
129 check();
130 clear();
132 }
133
134
142 float
144 {
145 std::lock_guard scoped_lock(m_mutex);
146 check();
147 check_init();
148 return m_trigger_rate_hz;
149 }
150
158 void
160 {
161 std::lock_guard scoped_lock(m_mutex);
162 check();
163 clear();
165 }
166
167
172 struct Time_distribution {
173 inline static const std::string KUniform = "kUniform";
174 inline static const std::string KPoisson = "kPoisson";
175 };
176
184 const std::string&
186 {
187 std::lock_guard scoped_lock(m_mutex);
188 check();
189 check_init();
190 return m_time_distribution;
191 }
192
200 void
201 set_time_distribution(const std::string& value)
202 {
203 std::lock_guard scoped_lock(m_mutex);
204 check();
205 clear();
207 }
208
209
217 const std::string&
219 {
220 std::lock_guard scoped_lock(m_mutex);
221 check();
222 check_init();
224 }
225
233 void
234 set_candidate_type_name(const std::string& value)
235 {
236 std::lock_guard scoped_lock(m_mutex);
237 check();
238 clear();
240 }
241
242
250 int64_t
252 {
253 std::lock_guard scoped_lock(m_mutex);
254 check();
255 check_init();
257 }
258
266 void
268 {
269 std::lock_guard scoped_lock(m_mutex);
270 check();
271 clear();
273 }
274
275
283 uint32_t
285 {
286 std::lock_guard scoped_lock(m_mutex);
287 check();
288 check_init();
290 }
291
299 void
301 {
302 std::lock_guard scoped_lock(m_mutex);
303 check();
304 clear();
306 }
307
308
316 uint32_t
318 {
319 std::lock_guard scoped_lock(m_mutex);
320 check();
321 check_init();
323 }
324
332 void
334 {
335 std::lock_guard scoped_lock(m_mutex);
336 check();
337 clear();
339 }
340
341
342 };
343
344 // out stream operator
345
346 inline std::ostream& operator<<(std::ostream& s, const RandomTCMakerConf& obj)
347 {
348 return obj.print_object(s);
349 }
350
351 typedef std::vector<const RandomTCMakerConf*>::const_iterator RandomTCMakerConfIterator;
352
353 }
354}
355
356#endif
void set_trigger_rate_hz(float value)
Set "trigger_rate_hz" attribute value. Trigger rate (in Hz) for the RandomTCMaker to produce the TCs.
uint32_t get_candidate_window_before_ts() const
Get "candidate_window_before_ts" attribute value. Candidate extension before its central time.
static const std::string & s_class_name
void set_candidate_window_after_ts(uint32_t value)
Set "candidate_window_after_ts" attribute value. Candidate extension after its central time.
const std::string & get_time_distribution() const
Get "time_distribution" attribute value. Type of distribution used for random timestamps (uniform or ...
static const std::string & __get_trigger_rate_hz_str() noexcept
void set_candidate_window_before_ts(uint32_t value)
Set "candidate_window_before_ts" attribute value. Candidate extension before its central time.
static const std::string & __get_candidate_window_before_ts_str() noexcept
static const std::string & __get_template_for_str() noexcept
static const std::string & __get_candidate_type_name_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...
static const std::string s_time_distribution
void set_time_distribution(const std::string &value)
Set "time_distribution" attribute value. Type of distribution used for random timestamps (uniform or ...
static const std::string & __get_candidate_window_after_ts_str() noexcept
static const std::string s_candidate_window_before_ts
void set_candidate_backshift_ts(int64_t value)
Set "candidate_backshift_ts" attribute value. Time backshift applied to the TC central time at the cr...
static const std::string & __get_candidate_backshift_ts_str() noexcept
uint32_t get_candidate_window_after_ts() const
Get "candidate_window_after_ts" attribute value. Candidate extension after its central time.
static const std::string s_candidate_type_name
static const std::string s_candidate_backshift_ts
static const std::string s_candidate_window_after_ts
void set_candidate_type_name(const std::string &value)
Set "candidate_type_name" attribute value. Enumerator name of the TC type, e.g. kTiming.
void set_template_for(const std::string &value)
Set "template_for" attribute value.
const std::string & get_candidate_type_name() const
Get "candidate_type_name" attribute value. Enumerator name of the TC type, e.g. kTiming.
static const std::string s_trigger_rate_hz
float get_trigger_rate_hz() const
Get "trigger_rate_hz" attribute value. Trigger rate (in Hz) for the RandomTCMaker to produce the TCs.
int64_t get_candidate_backshift_ts() const
Get "candidate_backshift_ts" attribute value. Time backshift applied to the TC central time at the cr...
static const std::string & __get_time_distribution_str() noexcept
const std::string & get_template_for() const
Get "template_for" attribute value.
RandomTCMakerConf(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
virtual void init(bool init_children)
void set_by_val(const std::string &name, T value)
Set attribute value.
void set_class(const std::string &name, const std::string &value)
Set attribute class 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< constRandomTCMakerConf * >::const_iterator RandomTCMakerConfIterator
Including Qt Headers.
msgpack::object obj