DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
DataWriterConf.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _DataWriterConf_0_dunedaq__appmodel_0_appmodel_H_
4#define _DataWriterConf_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 DataStoreConf;
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 ~DataWriterConf() 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
85
86
87 public:
88
89 // attribute names
90
91 inline static const std::string s_data_storage_prescale = "data_storage_prescale";
92 inline static const std::string s_min_write_retry_time_ms = "min_write_retry_time_ms";
93 inline static const std::string s_max_write_retry_time_ms = "max_write_retry_time_ms";
94 inline static const std::string s_write_retry_time_increase_factor = "write_retry_time_increase_factor";
95
96 static const std::string& __get_data_storage_prescale_str() noexcept { return s_data_storage_prescale; }
97 static const std::string& __get_min_write_retry_time_ms_str() noexcept { return s_min_write_retry_time_ms; }
98 static const std::string& __get_max_write_retry_time_ms_str() noexcept { return s_max_write_retry_time_ms; }
100
101
108 int32_t
110 {
111 std::lock_guard scoped_lock(m_mutex);
112 check();
113 check_init();
115 }
116
123 void
125 {
126 std::lock_guard scoped_lock(m_mutex);
127 check();
128 clear();
130 }
131
132
139 int32_t
141 {
142 std::lock_guard scoped_lock(m_mutex);
143 check();
144 check_init();
146 }
147
154 void
156 {
157 std::lock_guard scoped_lock(m_mutex);
158 check();
159 clear();
161 }
162
163
170 int32_t
172 {
173 std::lock_guard scoped_lock(m_mutex);
174 check();
175 check_init();
177 }
178
185 void
187 {
188 std::lock_guard scoped_lock(m_mutex);
189 check();
190 clear();
192 }
193
194
201 int32_t
203 {
204 std::lock_guard scoped_lock(m_mutex);
205 check();
206 check_init();
208 }
209
216 void
218 {
219 std::lock_guard scoped_lock(m_mutex);
220 check();
221 clear();
223 }
224
225
226 // relationship names
227
228 inline static const std::string s_data_store_params = "data_store_params";
229
230 static const std::string& __get_data_store_params_str() noexcept { return s_data_store_params; }
231
232
241 {
242 std::lock_guard scoped_lock(m_mutex);
243 check();
244 check_init();
246 {
247 std::ostringstream text;
248 text << "relationship \"" << s_data_store_params << "\" of object " << this << " is not set";
249 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
250 }
251 return m_data_store_params;
252 }
253
254
261 void
263
264 };
265
266 // out stream operator
267
268 inline std::ostream& operator<<(std::ostream& s, const DataWriterConf& obj)
269 {
270 return obj.print_object(s);
271 }
272
273 typedef std::vector<const DataWriterConf*>::const_iterator DataWriterConfIterator;
274
275 }
276}
277
278#endif
#define ERS_HERE
const dunedaq::appmodel::DataStoreConf * m_data_store_params
static const std::string s_write_retry_time_increase_factor
void set_data_store_params(const dunedaq::appmodel::DataStoreConf *value)
Set "data_store_params" relationship value.
virtual void init(bool init_children)
void set_max_write_retry_time_ms(int32_t value)
Set "max_write_retry_time_ms" attribute value.
int32_t get_data_storage_prescale() const
Get "data_storage_prescale" attribute value.
static const std::string & s_class_name
static const std::string & __get_data_store_params_str() noexcept
void set_write_retry_time_increase_factor(int32_t value)
Set "write_retry_time_increase_factor" attribute value.
DataWriterConf(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
static const std::string s_min_write_retry_time_ms
int32_t get_min_write_retry_time_ms() const
Get "min_write_retry_time_ms" attribute value.
static const std::string & __get_max_write_retry_time_ms_str() noexcept
int32_t get_write_retry_time_increase_factor() const
Get "write_retry_time_increase_factor" attribute value.
static const std::string & __get_data_storage_prescale_str() noexcept
const dunedaq::appmodel::DataStoreConf * get_data_store_params() const
Get "data_store_params" relationship value.
int32_t get_max_write_retry_time_ms() const
Get "max_write_retry_time_ms" attribute value.
virtual ~DataWriterConf() 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_data_storage_prescale
static const std::string & __get_min_write_retry_time_ms_str() noexcept
static const std::string & __get_write_retry_time_increase_factor_str() noexcept
void set_min_write_retry_time_ms(int32_t value)
Set "min_write_retry_time_ms" attribute value.
static const std::string s_data_store_params
void set_data_storage_prescale(int32_t value)
Set "data_storage_prescale" attribute value.
static const std::string s_max_write_retry_time_ms
void set_by_val(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< constDataWriterConf * >::const_iterator DataWriterConfIterator
Including Qt Headers.