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 class DataMoveCallbackConf;
26 }
27 namespace confmodel {
28 class GeoId;
29 }
30}
31
32
33namespace dunedaq {
34 namespace appmodel {
35
36 class DataHandlerModule : public dunedaq::confmodel::DaqModule {
37
39 friend class conffwk::DalObject;
40 friend class conffwk::DalFactory;
42
43 protected:
44
46 virtual ~DataHandlerModule() noexcept;
47 virtual void init(bool init_children);
48
49 public:
50
53 static const std::string& s_class_name;
54
55
65 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
66
67
77 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
78
79
80 protected:
81
82 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
83
84
85 private:
86
87 uint32_t m_source_id;
88 uint32_t m_detector_id;
91 const dunedaq::confmodel::GeoId* m_geo_id;
94
95
96 public:
97
98 // attribute names
99
100 inline static const std::string s_source_id = "source_id";
101 inline static const std::string s_detector_id = "detector_id";
102 inline static const std::string s_emulation_mode = "emulation_mode";
103 inline static const std::string s_post_processing_enabled = "post_processing_enabled";
104
105 static const std::string& __get_source_id_str() noexcept { return s_source_id; }
106 static const std::string& __get_detector_id_str() noexcept { return s_detector_id; }
107 static const std::string& __get_emulation_mode_str() noexcept { return s_emulation_mode; }
108 static const std::string& __get_post_processing_enabled_str() noexcept { return s_post_processing_enabled; }
109
110
117 uint32_t
119 {
120 std::lock_guard scoped_lock(m_mutex);
121 check();
122 check_init();
123 return m_source_id;
124 }
125
132 void
133 set_source_id(uint32_t value)
134 {
135 std::lock_guard scoped_lock(m_mutex);
136 check();
137 clear();
139 }
140
141
148 uint32_t
150 {
151 std::lock_guard scoped_lock(m_mutex);
152 check();
153 check_init();
154 return m_detector_id;
155 }
156
163 void
164 set_detector_id(uint32_t value)
165 {
166 std::lock_guard scoped_lock(m_mutex);
167 check();
168 clear();
170 }
171
172
179 bool
181 {
182 std::lock_guard scoped_lock(m_mutex);
183 check();
184 check_init();
185 return m_emulation_mode;
186 }
187
194 void
196 {
197 std::lock_guard scoped_lock(m_mutex);
198 check();
199 clear();
201 }
202
203
210 bool
212 {
213 std::lock_guard scoped_lock(m_mutex);
214 check();
215 check_init();
217 }
218
225 void
227 {
228 std::lock_guard scoped_lock(m_mutex);
229 check();
230 clear();
232 }
233
234
235 // relationship names
236
237 inline static const std::string s_geo_id = "geo_id";
238 inline static const std::string s_raw_data_callback = "raw_data_callback";
239 inline static const std::string s_module_configuration = "module_configuration";
240
241 static const std::string& __get_geo_id_str() noexcept { return s_geo_id; }
242 static const std::string& __get_raw_data_callback_str() noexcept { return s_raw_data_callback; }
243 static const std::string& __get_module_configuration_str() noexcept { return s_module_configuration; }
244
245
254 {
255 std::lock_guard scoped_lock(m_mutex);
256 check();
257 check_init();
258 return m_geo_id;
259 }
260
261
268 void
270
280 {
281 std::lock_guard scoped_lock(m_mutex);
282 check();
283 check_init();
284 return m_raw_data_callback;
285 }
286
287
295 void
297
306 {
307 std::lock_guard scoped_lock(m_mutex);
308 check();
309 check_init();
311 {
312 std::ostringstream text;
313 text << "relationship \"" << s_module_configuration << "\" of object " << this << " is not set";
314 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
315 }
317 }
318
319
326 void
328
329 };
330
331 // out stream operator
332
333 inline std::ostream& operator<<(std::ostream& s, const DataHandlerModule& obj)
334 {
335 return obj.print_object(s);
336 }
337
338 typedef std::vector<const DataHandlerModule*>::const_iterator DataHandlerModuleIterator;
339
340 }
341}
342
343#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
const dunedaq::appmodel::DataMoveCallbackConf * m_raw_data_callback
void set_detector_id(uint32_t value)
Set "detector_id" attribute value.
bool get_emulation_mode() const
Get "emulation_mode" attribute value.
const dunedaq::appmodel::DataMoveCallbackConf * get_raw_data_callback() const
Get "raw_data_callback" relationship value. Configuration for raw data callback.
static const std::string s_raw_data_callback
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
static const std::string & __get_raw_data_callback_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_raw_data_callback(const dunedaq::appmodel::DataMoveCallbackConf *value)
Set "raw_data_callback" relationship value. Configuration for raw data callback.
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.
msgpack::object obj