DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
DataRecorderConf.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _DataRecorderConf_0_dunedaq__appmodel_0_appmodel_H_
4#define _DataRecorderConf_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
17namespace dunedaq {
18 namespace appmodel {
19
21
22 friend class conffwk::Configuration;
23 friend class conffwk::DalObject;
24 friend class conffwk::DalFactory;
25 friend class conffwk::DalRegistry;
26
27 protected:
28
30 virtual ~DataRecorderConf() noexcept;
31 virtual void init(bool init_children);
32
33 public:
34
37 static const std::string& s_class_name;
38
39
49 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
50
51
61 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
62
63
64 protected:
65
66 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
67
68
69 private:
70
71 std::string m_output_file;
74 bool m_use_o_direct;
75
76
77 public:
78
79 // attribute names
80
81 inline static const std::string s_output_file = "output_file";
82 inline static const std::string s_streaming_buffer_size = "streaming_buffer_size";
83 inline static const std::string s_compression_algorithm = "compression_algorithm";
84 inline static const std::string s_use_o_direct = "use_o_direct";
85
86 static const std::string& __get_output_file_str() noexcept { return s_output_file; }
87 static const std::string& __get_streaming_buffer_size_str() noexcept { return s_streaming_buffer_size; }
88 static const std::string& __get_compression_algorithm_str() noexcept { return s_compression_algorithm; }
89 static const std::string& __get_use_o_direct_str() noexcept { return s_use_o_direct; }
90
91
98 const std::string&
100 {
101 std::lock_guard scoped_lock(m_mutex);
102 check();
103 check_init();
104 return m_output_file;
105 }
106
113 void
114 set_output_file(const std::string& value)
115 {
116 std::lock_guard scoped_lock(m_mutex);
117 check();
118 clear();
120 }
121
122
129 uint32_t
131 {
132 std::lock_guard scoped_lock(m_mutex);
133 check();
134 check_init();
136 }
137
144 void
146 {
147 std::lock_guard scoped_lock(m_mutex);
148 check();
149 clear();
151 }
152
153
160 const std::string&
162 {
163 std::lock_guard scoped_lock(m_mutex);
164 check();
165 check_init();
167 }
168
175 void
176 set_compression_algorithm(const std::string& value)
177 {
178 std::lock_guard scoped_lock(m_mutex);
179 check();
180 clear();
182 }
183
184
192 bool
194 {
195 std::lock_guard scoped_lock(m_mutex);
196 check();
197 check_init();
198 return m_use_o_direct;
199 }
200
208 void
210 {
211 std::lock_guard scoped_lock(m_mutex);
212 check();
213 clear();
215 }
216
217
218 };
219
220 // out stream operator
221
222 inline std::ostream& operator<<(std::ostream& s, const DataRecorderConf& obj)
223 {
224 return obj.print_object(s);
225 }
226
227 typedef std::vector<const DataRecorderConf*>::const_iterator DataRecorderConfIterator;
228
229 }
230}
231
232#endif
virtual void init(bool init_children)
static const std::string & __get_compression_algorithm_str() noexcept
void set_compression_algorithm(const std::string &value)
Set "compression_algorithm" attribute value.
static const std::string & __get_output_file_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 & __get_use_o_direct_str() noexcept
void set_output_file(const std::string &value)
Set "output_file" attribute value.
static const std::string s_use_o_direct
const std::string & get_output_file() const
Get "output_file" attribute value.
void set_use_o_direct(bool value)
Set "use_o_direct" attribute value. Whether to use O_DIRECT flag when opening files.
static const std::string s_streaming_buffer_size
static const std::string & __get_streaming_buffer_size_str() noexcept
void set_streaming_buffer_size(uint32_t value)
Set "streaming_buffer_size" attribute value.
static const std::string s_compression_algorithm
bool get_use_o_direct() const
Get "use_o_direct" attribute value. Whether to use O_DIRECT flag when opening files.
virtual ~DataRecorderConf() noexcept
DataRecorderConf(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
uint32_t get_streaming_buffer_size() const
Get "streaming_buffer_size" attribute value.
static const std::string & s_class_name
const std::string & get_compression_algorithm() const
Get "compression_algorithm" attribute value.
static const std::string s_output_file
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...
conffwk entry point
double offset
std::ostream & operator<<(std::ostream &s, const AVXAbsRunSumProcessor &obj)
std::vector< constDataRecorderConf * >::const_iterator DataRecorderConfIterator
Including Qt Headers.