DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
HDF5FileLayoutParams.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _HDF5FileLayoutParams_0_dunedaq__appmodel_0_appmodel_H_
4#define _HDF5FileLayoutParams_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 HDF5PathParams;
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 ~HDF5FileLayoutParams() 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 std::string m_view_group_name;
87
88
89 public:
90
91 // attribute names
92
93 inline static const std::string s_record_name_prefix = "record_name_prefix";
94 inline static const std::string s_digits_for_record_number = "digits_for_record_number";
95 inline static const std::string s_digits_for_sequence_number = "digits_for_sequence_number";
96 inline static const std::string s_record_header_dataset_name = "record_header_dataset_name";
97 inline static const std::string s_raw_data_group_name = "raw_data_group_name";
98 inline static const std::string s_view_group_name = "view_group_name";
99
100 static const std::string& __get_record_name_prefix_str() noexcept { return s_record_name_prefix; }
101 static const std::string& __get_digits_for_record_number_str() noexcept { return s_digits_for_record_number; }
102 static const std::string& __get_digits_for_sequence_number_str() noexcept { return s_digits_for_sequence_number; }
103 static const std::string& __get_record_header_dataset_name_str() noexcept { return s_record_header_dataset_name; }
104 static const std::string& __get_raw_data_group_name_str() noexcept { return s_raw_data_group_name; }
105 static const std::string& __get_view_group_name_str() noexcept { return s_view_group_name; }
106
107
114 const std::string&
116 {
117 std::lock_guard scoped_lock(m_mutex);
118 check();
119 check_init();
121 }
122
129 void
130 set_record_name_prefix(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();
152 }
153
160 void
162 {
163 std::lock_guard scoped_lock(m_mutex);
164 check();
165 clear();
167 }
168
169
176 int32_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();
214 }
215
222 void
223 set_record_header_dataset_name(const std::string& value)
224 {
225 std::lock_guard scoped_lock(m_mutex);
226 check();
227 clear();
229 }
230
231
238 const std::string&
240 {
241 std::lock_guard scoped_lock(m_mutex);
242 check();
243 check_init();
245 }
246
253 void
254 set_raw_data_group_name(const std::string& value)
255 {
256 std::lock_guard scoped_lock(m_mutex);
257 check();
258 clear();
260 }
261
262
269 const std::string&
271 {
272 std::lock_guard scoped_lock(m_mutex);
273 check();
274 check_init();
275 return m_view_group_name;
276 }
277
284 void
285 set_view_group_name(const std::string& 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_path_params_list = "path_params_list";
297
298 static const std::string& __get_path_params_list_str() noexcept { return s_path_params_list; }
299
300
307 const std::vector<const dunedaq::appmodel::HDF5PathParams*>&
309 {
310 std::lock_guard scoped_lock(m_mutex);
311 check();
312 check_init();
313 if (m_path_params_list.empty())
314 {
315 std::ostringstream text;
316 text << "relationship \"" << s_path_params_list << "\" of object " << this << " is empty";
317 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
318 }
319 return m_path_params_list;
320 }
321
322
329 void
330 set_path_params_list(const std::vector<const dunedaq::appmodel::HDF5PathParams*>& value);
331
332 };
333
334 // out stream operator
335
336 inline std::ostream& operator<<(std::ostream& s, const HDF5FileLayoutParams& obj)
337 {
338 return obj.print_object(s);
339 }
340
341 typedef std::vector<const HDF5FileLayoutParams*>::const_iterator HDF5FileLayoutParamsIterator;
342
343 }
344}
345
346#endif
#define ERS_HERE
const std::string & get_record_header_dataset_name() const
Get "record_header_dataset_name" attribute value.
void set_path_params_list(const std::vector< const dunedaq::appmodel::HDF5PathParams * > &value)
Set "path_params_list" relationship value.
static const std::string & __get_record_header_dataset_name_str() noexcept
const std::string & get_view_group_name() const
Get "view_group_name" attribute value.
void set_record_header_dataset_name(const std::string &value)
Set "record_header_dataset_name" attribute value.
const std::vector< const dunedaq::appmodel::HDF5PathParams * > & get_path_params_list() const
Get "path_params_list" relationship value.
static const std::string & __get_digits_for_sequence_number_str() noexcept
const std::string & get_record_name_prefix() const
Get "record_name_prefix" attribute value.
const std::string & get_raw_data_group_name() const
Get "raw_data_group_name" 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_raw_data_group_name_str() noexcept
static const std::string s_record_header_dataset_name
void set_view_group_name(const std::string &value)
Set "view_group_name" attribute value.
std::vector< const dunedaq::appmodel::HDF5PathParams * > m_path_params_list
virtual void init(bool init_children)
static const std::string & __get_record_name_prefix_str() noexcept
int32_t get_digits_for_sequence_number() const
Get "digits_for_sequence_number" attribute value.
void set_raw_data_group_name(const std::string &value)
Set "raw_data_group_name" attribute value.
static const std::string & __get_view_group_name_str() noexcept
static const std::string s_digits_for_sequence_number
void set_record_name_prefix(const std::string &value)
Set "record_name_prefix" attribute value.
void set_digits_for_sequence_number(int32_t value)
Set "digits_for_sequence_number" attribute value.
static const std::string & __get_path_params_list_str() noexcept
static const std::string & __get_digits_for_record_number_str() noexcept
HDF5FileLayoutParams(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
void set_digits_for_record_number(int32_t value)
Set "digits_for_record_number" attribute value.
int32_t get_digits_for_record_number() const
Get "digits_for_record_number" attribute value.
void set_by_val(const std::string &name, T value)
Set attribute 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::vector< constHDF5FileLayoutParams * >::const_iterator HDF5FileLayoutParamsIterator
std::ostream & operator<<(std::ostream &s, const AVXAbsRunSumProcessor &obj)
Including Qt Headers.