DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
TPStreamWriterConf.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _TPStreamWriterConf_0_dunedaq__appmodel_0_appmodel_H_
4#define _TPStreamWriterConf_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 ~TPStreamWriterConf() 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
84
85
86 public:
87
88 // attribute names
89
90 inline static const std::string s_tp_accumulation_interval = "tp_accumulation_interval";
91 inline static const std::string s_tp_accumulation_inactivity_time_before_write_sec = "tp_accumulation_inactivity_time_before_write_sec";
92 inline static const std::string s_warn_user_when_tardy_tps_are_discarded = "warn_user_when_tardy_tps_are_discarded";
93
94 static const std::string& __get_tp_accumulation_interval_str() noexcept { return s_tp_accumulation_interval; }
97
98
105 uint64_t
107 {
108 std::lock_guard scoped_lock(m_mutex);
109 check();
110 check_init();
112 }
113
120 void
122 {
123 std::lock_guard scoped_lock(m_mutex);
124 check();
125 clear();
127 }
128
129
136 float
138 {
139 std::lock_guard scoped_lock(m_mutex);
140 check();
141 check_init();
143 }
144
151 void
153 {
154 std::lock_guard scoped_lock(m_mutex);
155 check();
156 clear();
158 }
159
160
167 bool
169 {
170 std::lock_guard scoped_lock(m_mutex);
171 check();
172 check_init();
174 }
175
182 void
184 {
185 std::lock_guard scoped_lock(m_mutex);
186 check();
187 clear();
189 }
190
191
192 // relationship names
193
194 inline static const std::string s_data_store_params = "data_store_params";
195
196 static const std::string& __get_data_store_params_str() noexcept { return s_data_store_params; }
197
198
207 {
208 std::lock_guard scoped_lock(m_mutex);
209 check();
210 check_init();
212 {
213 std::ostringstream text;
214 text << "relationship \"" << s_data_store_params << "\" of object " << this << " is not set";
215 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
216 }
217 return m_data_store_params;
218 }
219
220
227 void
229
230 };
231
232 // out stream operator
233
234 inline std::ostream& operator<<(std::ostream& s, const TPStreamWriterConf& obj)
235 {
236 return obj.print_object(s);
237 }
238
239 typedef std::vector<const TPStreamWriterConf*>::const_iterator TPStreamWriterConfIterator;
240
241 }
242}
243
244#endif
#define ERS_HERE
static const std::string s_tp_accumulation_interval
bool get_warn_user_when_tardy_tps_are_discarded() const
Get "warn_user_when_tardy_tps_are_discarded" attribute value.
static const std::string & __get_tp_accumulation_inactivity_time_before_write_sec_str() noexcept
uint64_t get_tp_accumulation_interval() const
Get "tp_accumulation_interval" attribute value.
float get_tp_accumulation_inactivity_time_before_write_sec() const
Get "tp_accumulation_inactivity_time_before_write_sec" attribute value.
static const std::string s_tp_accumulation_inactivity_time_before_write_sec
static const std::string & __get_warn_user_when_tardy_tps_are_discarded_str() noexcept
const dunedaq::appmodel::DataStoreConf * m_data_store_params
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...
void set_data_store_params(const dunedaq::appmodel::DataStoreConf *value)
Set "data_store_params" relationship value.
void set_tp_accumulation_interval(uint64_t value)
Set "tp_accumulation_interval" attribute value.
const dunedaq::appmodel::DataStoreConf * get_data_store_params() const
Get "data_store_params" relationship value.
static const std::string s_warn_user_when_tardy_tps_are_discarded
void set_tp_accumulation_inactivity_time_before_write_sec(float value)
Set "tp_accumulation_inactivity_time_before_write_sec" attribute value.
TPStreamWriterConf(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
static const std::string & __get_data_store_params_str() noexcept
static const std::string & __get_tp_accumulation_interval_str() noexcept
void set_warn_user_when_tardy_tps_are_discarded(bool value)
Set "warn_user_when_tardy_tps_are_discarded" attribute value.
virtual void init(bool init_children)
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< constTPStreamWriterConf * >::const_iterator TPStreamWriterConfIterator
Including Qt Headers.