DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
TPReplayModuleConf.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _TPReplayModuleConf_0_dunedaq__appmodel_0_appmodel_H_
4#define _TPReplayModuleConf_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
17 // forward declaration for classes used in relationships and algorithms
18
19namespace dunedaq {
20 namespace appmodel {
21 class TPStreamConf;
22 }
23}
24
25
26namespace dunedaq {
27 namespace appmodel {
28
30
31 friend class conffwk::Configuration;
32 friend class conffwk::DalObject;
33 friend class conffwk::DalFactory;
34 friend class conffwk::DalRegistry;
35
36 protected:
37
39 virtual ~TPReplayModuleConf() noexcept;
40 virtual void init(bool init_children);
41
42 public:
43
46 static const std::string& s_class_name;
47
48
58 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
59
60
70 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
71
72
73 protected:
74
75 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
76
77
78 private:
79
80 std::string m_template_for;
81 int32_t m_number_of_loops;
83 std::string m_channel_map;
84 uint32_t m_total_planes;
85 std::vector<uint32_t> m_filter_out_plane;
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_number_of_loops = "number_of_loops";
95 inline static const std::string s_maximum_wait_time_us = "maximum_wait_time_us";
96 inline static const std::string s_channel_map = "channel_map";
97 inline static const std::string s_total_planes = "total_planes";
98 inline static const std::string s_filter_out_plane = "filter_out_plane";
99
100 static const std::string& __get_template_for_str() noexcept { return s_template_for; }
101 static const std::string& __get_number_of_loops_str() noexcept { return s_number_of_loops; }
102 static const std::string& __get_maximum_wait_time_us_str() noexcept { return s_maximum_wait_time_us; }
103 static const std::string& __get_channel_map_str() noexcept { return s_channel_map; }
104 static const std::string& __get_total_planes_str() noexcept { return s_total_planes; }
105 static const std::string& __get_filter_out_plane_str() noexcept { return s_filter_out_plane; }
106
107
114 const std::string&
116 {
117 std::lock_guard scoped_lock(m_mutex);
118 check();
119 check_init();
120 return m_template_for;
121 }
122
129 void
130 set_template_for(const std::string& value)
131 {
132 std::lock_guard scoped_lock(m_mutex);
133 check();
134 clear();
136 }
137
138
145 int32_t
147 {
148 std::lock_guard scoped_lock(m_mutex);
149 check();
150 check_init();
151 return m_number_of_loops;
152 }
153
160 void
161 set_number_of_loops(int32_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 const std::string&
209 {
210 std::lock_guard scoped_lock(m_mutex);
211 check();
212 check_init();
213 return m_channel_map;
214 }
215
222 void
223 set_channel_map(const std::string& value)
224 {
225 std::lock_guard scoped_lock(m_mutex);
226 check();
227 clear();
229 }
230
231
238 uint32_t
240 {
241 std::lock_guard scoped_lock(m_mutex);
242 check();
243 check_init();
244 return m_total_planes;
245 }
246
253 void
254 set_total_planes(uint32_t value)
255 {
256 std::lock_guard scoped_lock(m_mutex);
257 check();
258 clear();
260 }
261
262
269 const std::vector<uint32_t>&
271 {
272 std::lock_guard scoped_lock(m_mutex);
273 check();
274 check_init();
275 return m_filter_out_plane;
276 }
277
284 void
285 set_filter_out_plane(const std::vector<uint32_t>& value)
286 {
287 std::lock_guard scoped_lock(m_mutex);
288 check();
289 clear();
291 }
292
293
294 // relationship names
295
296 inline static const std::string s_tp_streams = "tp_streams";
297
298 static const std::string& __get_tp_streams_str() noexcept { return s_tp_streams; }
299
300
307 const std::vector<const dunedaq::appmodel::TPStreamConf*>&
309 {
310 std::lock_guard scoped_lock(m_mutex);
311 check();
312 check_init();
313 if (m_tp_streams.empty())
314 {
315 std::ostringstream text;
316 text << "relationship \"" << s_tp_streams << "\" of object " << this << " is empty";
317 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
318 }
319 return m_tp_streams;
320 }
321
322
329 void
330 set_tp_streams(const std::vector<const dunedaq::appmodel::TPStreamConf*>& value);
331
332 };
333
334 // out stream operator
335
336 inline std::ostream& operator<<(std::ostream& s, const TPReplayModuleConf& obj)
337 {
338 return obj.print_object(s);
339 }
340
341 typedef std::vector<const TPReplayModuleConf*>::const_iterator TPReplayModuleConfIterator;
342
343 }
344}
345
346#endif
#define ERS_HERE
void set_template_for(const std::string &value)
Set "template_for" attribute value.
static const std::string & __get_template_for_str() noexcept
std::vector< const dunedaq::appmodel::TPStreamConf * > m_tp_streams
static const std::string & __get_number_of_loops_str() noexcept
const std::string & get_channel_map() const
Get "channel_map" attribute value.
void set_channel_map(const std::string &value)
Set "channel_map" attribute value.
static const std::string & __get_maximum_wait_time_us_str() noexcept
static const std::string & __get_total_planes_str() noexcept
static const std::string & __get_filter_out_plane_str() noexcept
void set_total_planes(uint32_t value)
Set "total_planes" attribute value.
const std::vector< uint32_t > & get_filter_out_plane() const
Get "filter_out_plane" attribute value.
uint32_t get_total_planes() const
Get "total_planes" attribute value.
uint32_t get_maximum_wait_time_us() const
Get "maximum_wait_time_us" attribute value.
virtual void init(bool init_children)
const std::string & get_template_for() const
Get "template_for" attribute value.
TPReplayModuleConf(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
static const std::string & __get_channel_map_str() noexcept
static const std::string s_maximum_wait_time_us
void set_tp_streams(const std::vector< const dunedaq::appmodel::TPStreamConf * > &value)
Set "tp_streams" relationship value.
const std::vector< const dunedaq::appmodel::TPStreamConf * > & get_tp_streams() const
Get "tp_streams" relationship value.
void set_maximum_wait_time_us(uint32_t value)
Set "maximum_wait_time_us" attribute value.
int32_t get_number_of_loops() const
Get "number_of_loops" attribute value.
void set_number_of_loops(int32_t value)
Set "number_of_loops" attribute value.
void set_filter_out_plane(const std::vector< uint32_t > &value)
Set "filter_out_plane" 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...
static const std::string & __get_tp_streams_str() noexcept
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.
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< constTPReplayModuleConf * >::const_iterator TPReplayModuleConfIterator
Including Qt Headers.