DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
DetectorConfig.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _DetectorConfig_0_dunedaq__confmodel_0_confmodel_H_
4#define _DetectorConfig_0_dunedaq__confmodel_0_confmodel_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 confmodel {
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 ~DetectorConfig() 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_tpg_channel_map;
72 uint32_t m_clock_speed_hz;
73 std::string m_op_env;
75
76
77 public:
78
79 // attribute names
80
81 inline static const std::string s_tpg_channel_map = "tpg_channel_map";
82 inline static const std::string s_clock_speed_hz = "clock_speed_hz";
83 inline static const std::string s_op_env = "op_env";
84 inline static const std::string s_offline_data_stream = "offline_data_stream";
85
86 static const std::string& __get_tpg_channel_map_str() noexcept { return s_tpg_channel_map; }
87 static const std::string& __get_clock_speed_hz_str() noexcept { return s_clock_speed_hz; }
88 static const std::string& __get_op_env_str() noexcept { return s_op_env; }
89 static const std::string& __get_offline_data_stream_str() noexcept { return s_offline_data_stream; }
90
91
99 const std::string&
101 {
102 std::lock_guard scoped_lock(m_mutex);
103 check();
104 check_init();
105 return m_tpg_channel_map;
106 }
107
115 void
116 set_tpg_channel_map(const std::string& value)
117 {
118 std::lock_guard scoped_lock(m_mutex);
119 check();
120 clear();
122 }
123
124
131 uint32_t
133 {
134 std::lock_guard scoped_lock(m_mutex);
135 check();
136 check_init();
137 return m_clock_speed_hz;
138 }
139
146 void
147 set_clock_speed_hz(uint32_t value)
148 {
149 std::lock_guard scoped_lock(m_mutex);
150 check();
151 clear();
153 }
154
155
163 const std::string&
165 {
166 std::lock_guard scoped_lock(m_mutex);
167 check();
168 check_init();
169 return m_op_env;
170 }
171
179 void
180 set_op_env(const std::string& value)
181 {
182 std::lock_guard scoped_lock(m_mutex);
183 check();
184 clear();
185 p_obj.set_by_ref(s_op_env, value);
186 }
187
188
196 const std::string&
198 {
199 std::lock_guard scoped_lock(m_mutex);
200 check();
201 check_init();
203 }
204
212 void
213 set_offline_data_stream(const std::string& value)
214 {
215 std::lock_guard scoped_lock(m_mutex);
216 check();
217 clear();
219 }
220
221
222 };
223
224 // out stream operator
225
226 inline std::ostream& operator<<(std::ostream& s, const DetectorConfig& obj)
227 {
228 return obj.print_object(s);
229 }
230
231 typedef std::vector<const DetectorConfig*>::const_iterator DetectorConfigIterator;
232
233 }
234}
235
236#endif
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...
DetectorConfig(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
virtual void init(bool init_children)
void set_op_env(const std::string &value)
Set "op_env" attribute value. Operational environment.
const std::string & get_offline_data_stream() const
Get "offline_data_stream" attribute value. The data stream value that we send to offline.
static const std::string s_op_env
static const std::string s_clock_speed_hz
static const std::string & __get_clock_speed_hz_str() noexcept
void set_clock_speed_hz(uint32_t value)
Set "clock_speed_hz" attribute value.
static const std::string s_offline_data_stream
static const std::string & __get_tpg_channel_map_str() noexcept
static const std::string & s_class_name
const std::string & get_op_env() const
Get "op_env" attribute value. Operational environment.
static const std::string & __get_offline_data_stream_str() noexcept
uint32_t get_clock_speed_hz() const
Get "clock_speed_hz" 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 s_tpg_channel_map
void set_tpg_channel_map(const std::string &value)
Set "tpg_channel_map" attribute value. Trigger Primitive channel map.
void set_offline_data_stream(const std::string &value)
Set "offline_data_stream" attribute value. The data stream value that we send to offline.
virtual ~DetectorConfig() noexcept
static const std::string & __get_op_env_str() noexcept
const std::string & get_tpg_channel_map() const
Get "tpg_channel_map" attribute value. Trigger Primitive channel map.
conffwk entry point
double offset
std::vector< constDetectorConfig * >::const_iterator DetectorConfigIterator
std::ostream & operator<<(std::ostream &s, const ActionPlan &obj)
Including Qt Headers.