DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
DataHandlerModule.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _DataHandlerModule_0_dunedaq__appmodel_0_appmodel_H_
4#define _DataHandlerModule_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 // include files for classes used in inheritance hierarchy
17
19
20 // forward declaration for classes used in relationships and algorithms
21
22namespace dunedaq {
23 namespace appmodel {
24 class DataHandlerConf;
25 }
26 namespace confmodel {
27 class GeoId;
28 }
29}
30
31
32namespace dunedaq {
33 namespace appmodel {
34
36
37 friend class conffwk::Configuration;
38 friend class conffwk::DalObject;
39 friend class conffwk::DalFactory;
40 friend class conffwk::DalRegistry;
41
42 protected:
43
45 virtual ~DataHandlerModule() noexcept;
46 virtual void init(bool init_children);
47
48 public:
49
52 static const std::string& s_class_name;
53
54
64 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
65
66
76 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
77
78
79 protected:
80
81 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
82
83
84 private:
85
86 uint32_t m_source_id;
87 uint32_t m_detector_id;
90 const dunedaq::confmodel::GeoId* m_geo_id;
92
93
94 public:
95
96 // attribute names
97
98 inline static const std::string s_source_id = "source_id";
99 inline static const std::string s_detector_id = "detector_id";
100 inline static const std::string s_emulation_mode = "emulation_mode";
101 inline static const std::string s_post_processing_enabled = "post_processing_enabled";
102
103 static const std::string& __get_source_id_str() noexcept { return s_source_id; }
104 static const std::string& __get_detector_id_str() noexcept { return s_detector_id; }
105 static const std::string& __get_emulation_mode_str() noexcept { return s_emulation_mode; }
106 static const std::string& __get_post_processing_enabled_str() noexcept { return s_post_processing_enabled; }
107
108
115 uint32_t
117 {
118 std::lock_guard scoped_lock(m_mutex);
119 check();
120 check_init();
121 return m_source_id;
122 }
123
130 void
131 set_source_id(uint32_t value)
132 {
133 std::lock_guard scoped_lock(m_mutex);
134 check();
135 clear();
137 }
138
139
146 uint32_t
148 {
149 std::lock_guard scoped_lock(m_mutex);
150 check();
151 check_init();
152 return m_detector_id;
153 }
154
161 void
162 set_detector_id(uint32_t value)
163 {
164 std::lock_guard scoped_lock(m_mutex);
165 check();
166 clear();
168 }
169
170
177 bool
179 {
180 std::lock_guard scoped_lock(m_mutex);
181 check();
182 check_init();
183 return m_emulation_mode;
184 }
185
192 void
194 {
195 std::lock_guard scoped_lock(m_mutex);
196 check();
197 clear();
199 }
200
201
208 bool
210 {
211 std::lock_guard scoped_lock(m_mutex);
212 check();
213 check_init();
215 }
216
223 void
225 {
226 std::lock_guard scoped_lock(m_mutex);
227 check();
228 clear();
230 }
231
232
233 // relationship names
234
235 inline static const std::string s_geo_id = "geo_id";
236 inline static const std::string s_module_configuration = "module_configuration";
237
238 static const std::string& __get_geo_id_str() noexcept { return s_geo_id; }
239 static const std::string& __get_module_configuration_str() noexcept { return s_module_configuration; }
240
241
250 {
251 std::lock_guard scoped_lock(m_mutex);
252 check();
253 check_init();
254 return m_geo_id;
255 }
256
257
264 void
266
275 {
276 std::lock_guard scoped_lock(m_mutex);
277 check();
278 check_init();
280 {
281 std::ostringstream text;
282 text << "relationship \"" << s_module_configuration << "\" of object " << this << " is not set";
283 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
284 }
286 }
287
288
295 void
297
298 };
299
300 // out stream operator
301
302 inline std::ostream& operator<<(std::ostream& s, const DataHandlerModule& obj)
303 {
304 return obj.print_object(s);
305 }
306
307 typedef std::vector<const DataHandlerModule*>::const_iterator DataHandlerModuleIterator;
308
309 }
310}
311
312#endif
#define ERS_HERE
void set_module_configuration(const dunedaq::appmodel::DataHandlerConf *value)
Set "module_configuration" relationship value.
uint32_t get_detector_id() const
Get "detector_id" attribute value.
static const std::string & __get_detector_id_str() noexcept
const dunedaq::appmodel::DataHandlerConf * get_module_configuration() const
Get "module_configuration" relationship value.
static const std::string & __get_emulation_mode_str() noexcept
static const std::string & __get_geo_id_str() noexcept
static const std::string s_post_processing_enabled
void set_geo_id(const dunedaq::confmodel::GeoId *value)
Set "geo_id" relationship value.
static const std::string s_module_configuration
static const std::string & s_class_name
const dunedaq::confmodel::GeoId * m_geo_id
void set_detector_id(uint32_t value)
Set "detector_id" attribute value.
bool get_emulation_mode() const
Get "emulation_mode" attribute value.
uint32_t get_source_id() const
Get "source_id" attribute value.
void set_post_processing_enabled(bool value)
Set "post_processing_enabled" attribute value.
DataHandlerModule(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) 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_module_configuration_str() noexcept
static const std::string & __get_post_processing_enabled_str() noexcept
void set_source_id(uint32_t value)
Set "source_id" attribute value.
virtual void init(bool init_children)
static const std::string & __get_source_id_str() noexcept
void set_emulation_mode(bool value)
Set "emulation_mode" attribute value.
const dunedaq::appmodel::DataHandlerConf * m_module_configuration
bool get_post_processing_enabled() const
Get "post_processing_enabled" attribute value.
const dunedaq::confmodel::GeoId * get_geo_id() const
Get "geo_id" relationship value.
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::vector< constDataHandlerModule * >::const_iterator DataHandlerModuleIterator
std::ostream & operator<<(std::ostream &s, const AVXAbsRunSumProcessor &obj)
Including Qt Headers.