DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
DataReaderConf.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _DataReaderConf_0_dunedaq__appmodel_0_appmodel_H_
4#define _DataReaderConf_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 SNBFileSourceParameters;
22 class StreamEmulationParameters;
23 }
24}
25
26
27namespace dunedaq {
28 namespace appmodel {
29
31
32 friend class conffwk::Configuration;
33 friend class conffwk::DalObject;
34 friend class conffwk::DalFactory;
35 friend class conffwk::DalRegistry;
36
37 protected:
38
40 virtual ~DataReaderConf() noexcept;
41 virtual void init(bool init_children);
42
43 public:
44
47 static const std::string& s_class_name;
48
49
59 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
60
61
71 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
72
73
74 protected:
75
76 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
77
78
79 private:
80
81 std::string m_template_for;
85
86
87 public:
88
89 // attribute names
90
91 inline static const std::string s_template_for = "template_for";
92 inline static const std::string s_emulation_mode = "emulation_mode";
93
94 static const std::string& __get_template_for_str() noexcept { return s_template_for; }
95 static const std::string& __get_emulation_mode_str() noexcept { return s_emulation_mode; }
96
97
105 const std::string&
107 {
108 std::lock_guard scoped_lock(m_mutex);
109 check();
110 check_init();
111 return m_template_for;
112 }
113
121 void
122 set_template_for(const std::string& value)
123 {
124 std::lock_guard scoped_lock(m_mutex);
125 check();
126 clear();
128 }
129
130
137 bool
139 {
140 std::lock_guard scoped_lock(m_mutex);
141 check();
142 check_init();
143 return m_emulation_mode;
144 }
145
152 void
154 {
155 std::lock_guard scoped_lock(m_mutex);
156 check();
157 clear();
159 }
160
161
162 // relationship names
163
164 inline static const std::string s_emulation_conf = "emulation_conf";
165 inline static const std::string s_snb_conf = "snb_conf";
166
167 static const std::string& __get_emulation_conf_str() noexcept { return s_emulation_conf; }
168 static const std::string& __get_snb_conf_str() noexcept { return s_snb_conf; }
169
170
180 {
181 std::lock_guard scoped_lock(m_mutex);
182 check();
183 check_init();
184 return m_emulation_conf;
185 }
186
187
195 void
197
207 {
208 std::lock_guard scoped_lock(m_mutex);
209 check();
210 check_init();
211 return m_snb_conf;
212 }
213
214
222 void
224
225 };
226
227 // out stream operator
228
229 inline std::ostream& operator<<(std::ostream& s, const DataReaderConf& obj)
230 {
231 return obj.print_object(s);
232 }
233
234 typedef std::vector<const DataReaderConf*>::const_iterator DataReaderConfIterator;
235
236 }
237}
238
239#endif
const dunedaq::appmodel::StreamEmulationParameters * get_emulation_conf() const
Get "emulation_conf" relationship value. Parameters for emulating the stream.
virtual void init(bool init_children)
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_class_name
static const std::string & __get_template_for_str() noexcept
static const std::string s_emulation_mode
static const std::string s_template_for
static const std::string & __get_emulation_conf_str() noexcept
void set_template_for(const std::string &value)
Set "template_for" attribute value. OKS class of the DataReaderModule that this config is a template ...
const dunedaq::appmodel::SNBFileSourceParameters * m_snb_conf
const std::string & get_template_for() const
Get "template_for" attribute value. OKS class of the DataReaderModule that this config is a template ...
DataReaderConf(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
bool get_emulation_mode() const
Get "emulation_mode" attribute value.
static const std::string & __get_snb_conf_str() noexcept
static const std::string s_snb_conf
static const std::string s_emulation_conf
virtual ~DataReaderConf() noexcept
const dunedaq::appmodel::StreamEmulationParameters * m_emulation_conf
void set_emulation_mode(bool value)
Set "emulation_mode" attribute value.
void set_emulation_conf(const dunedaq::appmodel::StreamEmulationParameters *value)
Set "emulation_conf" relationship value. Parameters for emulating the stream.
static const std::string & __get_emulation_mode_str() noexcept
void set_snb_conf(const dunedaq::appmodel::SNBFileSourceParameters *value)
Set "snb_conf" relationship value. Parameters for the SNB file stream.
const dunedaq::appmodel::SNBFileSourceParameters * get_snb_conf() const
Get "snb_conf" relationship value. Parameters for the SNB file stream.
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.
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::vector< constDataReaderConf * >::const_iterator DataReaderConfIterator
std::ostream & operator<<(std::ostream &s, const AVXAbsRunSumProcessor &obj)
The DUNE-DAQ namespace.
msgpack::object obj