DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
FixedTimeTCMakerModuleConf.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _FixedTimeTCMakerModuleConf_0_dunedaq__appmodel_0_appmodel_H_
4#define _FixedTimeTCMakerModuleConf_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 FixedTimeTCConf;
25 }
26}
27
28
29namespace dunedaq {
30 namespace appmodel {
31
33
34 friend class conffwk::Configuration;
35 friend class conffwk::DalObject;
36 friend class conffwk::DalFactory;
37 friend class conffwk::DalRegistry;
38
39 protected:
40
42 virtual ~FixedTimeTCMakerModuleConf() noexcept;
43 virtual void init(bool init_children);
44
45 public:
46
49 static const std::string& s_class_name;
50
51
61 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
62
63
73 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
74
75
76 protected:
77
78 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
79
80
81 private:
82
83 uint64_t m_wait_time_ms;
84 std::string m_tc_type_name;
85 std::vector<const dunedaq::appmodel::FixedTimeTCConf*> m_triggers;
86
87
88 public:
89
90 // attribute names
91
92 inline static const std::string s_wait_time_ms = "wait_time_ms";
93 inline static const std::string s_tc_type_name = "tc_type_name";
94
95 static const std::string& __get_wait_time_ms_str() noexcept { return s_wait_time_ms; }
96 static const std::string& __get_tc_type_name_str() noexcept { return s_tc_type_name; }
97
98
106 uint64_t
108 {
109 std::lock_guard scoped_lock(m_mutex);
110 check();
111 check_init();
112 return m_wait_time_ms;
113 }
114
122 void
123 set_wait_time_ms(uint64_t value)
124 {
125 std::lock_guard scoped_lock(m_mutex);
126 check();
127 clear();
129 }
130
131
139 const std::string&
141 {
142 std::lock_guard scoped_lock(m_mutex);
143 check();
144 check_init();
145 return m_tc_type_name;
146 }
147
155 void
156 set_tc_type_name(const std::string& value)
157 {
158 std::lock_guard scoped_lock(m_mutex);
159 check();
160 clear();
162 }
163
164
165 // relationship names
166
167 inline static const std::string s_triggers = "triggers";
168
169 static const std::string& __get_triggers_str() noexcept { return s_triggers; }
170
171
179 const std::vector<const dunedaq::appmodel::FixedTimeTCConf*>&
181 {
182 std::lock_guard scoped_lock(m_mutex);
183 check();
184 check_init();
185 if (m_triggers.empty())
186 {
187 std::ostringstream text;
188 text << "relationship \"" << s_triggers << "\" of object " << this << " is empty";
189 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
190 }
191 return m_triggers;
192 }
193
194
202 void
203 set_triggers(const std::vector<const dunedaq::appmodel::FixedTimeTCConf*>& value);
204
205 };
206
207 // out stream operator
208
209 inline std::ostream& operator<<(std::ostream& s, const FixedTimeTCMakerModuleConf& obj)
210 {
211 return obj.print_object(s);
212 }
213
214 typedef std::vector<const FixedTimeTCMakerModuleConf*>::const_iterator FixedTimeTCMakerModuleConfIterator;
215
216 }
217}
218
219#endif
#define ERS_HERE
static const std::string & __get_triggers_str() noexcept
static const std::string & __get_wait_time_ms_str() noexcept
FixedTimeTCMakerModuleConf(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
static const std::string & __get_tc_type_name_str() noexcept
const std::string & get_tc_type_name() const
Get "tc_type_name" attribute value. Enumerator name of the TC type, e.g. kTiming.
std::vector< const dunedaq::appmodel::FixedTimeTCConf * > m_triggers
uint64_t get_wait_time_ms() const
Get "wait_time_ms" attribute value. Time to wait between TriggerCandidates.
void set_tc_type_name(const std::string &value)
Set "tc_type_name" attribute value. Enumerator name of the TC type, e.g. kTiming.
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...
const std::vector< const dunedaq::appmodel::FixedTimeTCConf * > & get_triggers() const
Get "triggers" relationship value. Timestamps for the TCs to generate.
void set_wait_time_ms(uint64_t value)
Set "wait_time_ms" attribute value. Time to wait between TriggerCandidates.
void set_triggers(const std::vector< const dunedaq::appmodel::FixedTimeTCConf * > &value)
Set "triggers" relationship value. Timestamps for the TCs to generate.
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...
Generic configuration exception.
conffwk entry point
double offset
std::vector< constFixedTimeTCMakerModuleConf * >::const_iterator FixedTimeTCMakerModuleConfIterator
std::ostream & operator<<(std::ostream &s, const AVXAbsRunSumProcessor &obj)
The DUNE-DAQ namespace.
msgpack::object obj