DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
HSI2TCTranslatorConf.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _HSI2TCTranslatorConf_0_dunedaq__appmodel_0_appmodel_H_
4#define _HSI2TCTranslatorConf_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 HSISignalWindow;
25 }
26}
27
28
29namespace dunedaq {
30 namespace appmodel {
31
32 class HSI2TCTranslatorConf : public dunedaq::appmodel::DataReaderConf {
33
35 friend class conffwk::DalObject;
36 friend class conffwk::DalFactory;
38
39 protected:
40
42 virtual ~HSI2TCTranslatorConf() 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 uint32_t m_prescale;
86
87
88 public:
89
90 // attribute names
91
92 inline static const std::string s_prescale = "prescale";
93 inline static const std::string s_latency_monitoring = "latency_monitoring";
94
95 static const std::string& __get_prescale_str() noexcept { return s_prescale; }
96 static const std::string& __get_latency_monitoring_str() noexcept { return s_latency_monitoring; }
97
98
106 uint32_t
108 {
109 std::lock_guard scoped_lock(m_mutex);
110 check();
111 check_init();
112 return m_prescale;
113 }
114
122 void
123 set_prescale(uint32_t value)
124 {
125 std::lock_guard scoped_lock(m_mutex);
126 check();
127 clear();
129 }
130
131
139 bool
141 {
142 std::lock_guard scoped_lock(m_mutex);
143 check();
144 check_init();
146 }
147
155 void
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_signals = "signals";
168
169 static const std::string& __get_signals_str() noexcept { return s_signals; }
170
171
179 const std::vector<const dunedaq::appmodel::HSISignalWindow*>&
181 {
182 std::lock_guard scoped_lock(m_mutex);
183 check();
184 check_init();
185 if (m_signals.empty())
186 {
187 std::ostringstream text;
188 text << "relationship \"" << s_signals << "\" of object " << this << " is empty";
189 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
190 }
191 return m_signals;
192 }
193
194
202 void
203 set_signals(const std::vector<const dunedaq::appmodel::HSISignalWindow*>& value);
204
205 };
206
207 // out stream operator
208
209 inline std::ostream& operator<<(std::ostream& s, const HSI2TCTranslatorConf& obj)
210 {
211 return obj.print_object(s);
212 }
213
214 typedef std::vector<const HSI2TCTranslatorConf*>::const_iterator HSI2TCTranslatorConfIterator;
215
216 }
217}
218
219#endif
#define ERS_HERE
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_signals_str() noexcept
const std::vector< const dunedaq::appmodel::HSISignalWindow * > & get_signals() const
Get "signals" relationship value. HSI signal bit-to-TC map, including TC type and TC window size.
static const std::string & __get_latency_monitoring_str() noexcept
void set_signals(const std::vector< const dunedaq::appmodel::HSISignalWindow * > &value)
Set "signals" relationship value. HSI signal bit-to-TC map, including TC type and TC window size.
uint32_t get_prescale() const
Get "prescale" attribute value. Prescale factor to apply to HSIEvent input.
virtual void init(bool init_children)
HSI2TCTranslatorConf(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
void set_latency_monitoring(bool value)
Set "latency_monitoring" attribute value. Should we monitor latency in Grafana?
static const std::string & __get_prescale_str() noexcept
std::vector< const dunedaq::appmodel::HSISignalWindow * > m_signals
bool get_latency_monitoring() const
Get "latency_monitoring" attribute value. Should we monitor latency in Grafana?
void set_prescale(uint32_t value)
Set "prescale" attribute value. Prescale factor to apply to HSIEvent input.
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< constHSI2TCTranslatorConf * >::const_iterator HSI2TCTranslatorConfIterator
Including Qt Headers.