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
20 // forward declaration for classes used in relationships and algorithms
21
22namespace dunedaq {
23 namespace appmodel {
24 class TCReadoutMap;
25 }
26}
27
28
29namespace dunedaq {
30 namespace appmodel {
31
32 class RandomTCMakerConf : public dunedaq::appmodel::StandaloneTCMakerConf {
33
35 friend class conffwk::DalObject;
36 friend class conffwk::DalFactory;
38
39 protected:
40
42 virtual ~RandomTCMakerConf() noexcept;
43 virtual void init(bool init_children);
44
45 public:
46
49 static const std::string& s_class_name;
50
51
61 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
62
63
73 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
74
75
76 protected:
77
78 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
79
80
81 private:
82
87
88
89 public:
90
91 // attribute names
92
93 inline static const std::string s_template_for = "template_for";
94 inline static const std::string s_trigger_rate_hz = "trigger_rate_hz";
95 inline static const std::string s_time_distribution = "time_distribution";
96
97 static const std::string& __get_template_for_str() noexcept { return s_template_for; }
98 static const std::string& __get_trigger_rate_hz_str() noexcept { return s_trigger_rate_hz; }
99 static const std::string& __get_time_distribution_str() noexcept { return s_time_distribution; }
100
101
108 const std::string&
110 {
111 std::lock_guard scoped_lock(m_mutex);
112 check();
113 check_init();
114 return m_template_for;
115 }
116
123 void
124 set_template_for(const std::string& value)
125 {
126 std::lock_guard scoped_lock(m_mutex);
127 check();
128 clear();
130 }
131
132
140 float
142 {
143 std::lock_guard scoped_lock(m_mutex);
144 check();
145 check_init();
146 return m_trigger_rate_hz;
147 }
148
156 void
158 {
159 std::lock_guard scoped_lock(m_mutex);
160 check();
161 clear();
163 }
164
165
170 struct Time_distribution {
171 inline static const std::string KUniform = "kUniform";
172 inline static const std::string KPoisson = "kPoisson";
173 };
174
182 const std::string&
184 {
185 std::lock_guard scoped_lock(m_mutex);
186 check();
187 check_init();
188 return m_time_distribution;
189 }
190
198 void
199 set_time_distribution(const std::string& value)
200 {
201 std::lock_guard scoped_lock(m_mutex);
202 check();
203 clear();
205 }
206
207
208 // relationship names
209
210 inline static const std::string s_tc_readout = "tc_readout";
211
212 static const std::string& __get_tc_readout_str() noexcept { return s_tc_readout; }
213
214
224 {
225 std::lock_guard scoped_lock(m_mutex);
226 check();
227 check_init();
228 if (!m_tc_readout)
229 {
230 std::ostringstream text;
231 text << "relationship \"" << s_tc_readout << "\" of object " << this << " is not set";
232 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
233 }
234 return m_tc_readout;
235 }
236
237
245 void
247
248 };
249
250 // out stream operator
251
252 inline std::ostream& operator<<(std::ostream& s, const RandomTCMakerConf& obj)
253 {
254 return obj.print_object(s);
255 }
256
257 typedef std::vector<const RandomTCMakerConf*>::const_iterator RandomTCMakerConfIterator;
258
259 }
260}
261
262#endif
#define ERS_HERE
void set_trigger_rate_hz(float value)
Set "trigger_rate_hz" attribute value. Trigger rate (in Hz) for the RandomTCMaker to produce the TCs.
void set_tc_readout(const dunedaq::appmodel::TCReadoutMap *value)
Set "tc_readout" relationship value. Configuration for the TC output type and the TC window size.
static const std::string & s_class_name
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
const dunedaq::appmodel::TCReadoutMap * get_tc_readout() const
Get "tc_readout" relationship value. Configuration for the TC output type and the TC window size.
static const std::string & __get_template_for_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_tc_readout_str() noexcept
void set_template_for(const std::string &value)
Set "template_for" attribute value.
const dunedaq::appmodel::TCReadoutMap * m_tc_readout
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.
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_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...
Generic configuration exception.
conffwk entry point
double offset
std::ostream & operator<<(std::ostream &s, const AVXAbsRunSumProcessor &obj)
std::vector< constRandomTCMakerConf * >::const_iterator RandomTCMakerConfIterator
Including Qt Headers.