DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
HSISignalWindow.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _HSISignalWindow_0_dunedaq__appmodel_0_appmodel_H_
4#define _HSISignalWindow_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
17namespace dunedaq {
18 namespace appmodel {
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 ~HSISignalWindow() 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 uint32_t m_signal_type;
72 std::string m_tc_type_name;
73 uint32_t m_time_before;
74 uint32_t m_time_after;
75
76
77 public:
78
79 // attribute names
80
81 inline static const std::string s_signal_type = "signal_type";
82 inline static const std::string s_tc_type_name = "tc_type_name";
83 inline static const std::string s_time_before = "time_before";
84 inline static const std::string s_time_after = "time_after";
85
86 static const std::string& __get_signal_type_str() noexcept { return s_signal_type; }
87 static const std::string& __get_tc_type_name_str() noexcept { return s_tc_type_name; }
88 static const std::string& __get_time_before_str() noexcept { return s_time_before; }
89 static const std::string& __get_time_after_str() noexcept { return s_time_after; }
90
91
99 uint32_t
101 {
102 std::lock_guard scoped_lock(m_mutex);
103 check();
104 check_init();
105 return m_signal_type;
106 }
107
115 void
116 set_signal_type(uint32_t value)
117 {
118 std::lock_guard scoped_lock(m_mutex);
119 check();
120 clear();
122 }
123
124
132 const std::string&
134 {
135 std::lock_guard scoped_lock(m_mutex);
136 check();
137 check_init();
138 return m_tc_type_name;
139 }
140
148 void
149 set_tc_type_name(const std::string& value)
150 {
151 std::lock_guard scoped_lock(m_mutex);
152 check();
153 clear();
155 }
156
157
165 uint32_t
167 {
168 std::lock_guard scoped_lock(m_mutex);
169 check();
170 check_init();
171 return m_time_before;
172 }
173
181 void
182 set_time_before(uint32_t value)
183 {
184 std::lock_guard scoped_lock(m_mutex);
185 check();
186 clear();
188 }
189
190
198 uint32_t
200 {
201 std::lock_guard scoped_lock(m_mutex);
202 check();
203 check_init();
204 return m_time_after;
205 }
206
214 void
215 set_time_after(uint32_t value)
216 {
217 std::lock_guard scoped_lock(m_mutex);
218 check();
219 clear();
221 }
222
223
224 };
225
226 // out stream operator
227
228 inline std::ostream& operator<<(std::ostream& s, const HSISignalWindow& obj)
229 {
230 return obj.print_object(s);
231 }
232
233 typedef std::vector<const HSISignalWindow*>::const_iterator HSISignalWindowIterator;
234
235 }
236}
237
238#endif
static const std::string s_tc_type_name
void set_signal_type(uint32_t value)
Set "signal_type" attribute value. HSI signal bit to convert into a TC.
static const std::string & s_class_name
static const std::string & __get_time_after_str() noexcept
static const std::string s_time_before
static const std::string & __get_tc_type_name_str() noexcept
const std::string & get_tc_type_name() const
Get "tc_type_name" attribute value. TC type (as string) to generate for a given HSI bit.
HSISignalWindow(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
uint32_t get_time_before() const
Get "time_before" attribute value. Time, in ticks, before the HSI timestamp, for the TriggerCandidate...
static const std::string & __get_signal_type_str() noexcept
static const std::string s_signal_type
virtual ~HSISignalWindow() noexcept
void set_time_after(uint32_t value)
Set "time_after" attribute value. Time, in ticks, after the HSI timestamp, for the TriggerCandidate e...
static const std::string s_time_after
void set_tc_type_name(const std::string &value)
Set "tc_type_name" attribute value. TC type (as string) to generate for a given HSI bit.
virtual void init(bool init_children)
uint32_t get_time_after() const
Get "time_after" attribute value. Time, in ticks, after the HSI timestamp, for the TriggerCandidate e...
uint32_t get_signal_type() const
Get "signal_type" attribute value. HSI signal bit to convert into a TC.
static const std::string & __get_time_before_str() 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...
void set_time_before(uint32_t value)
Set "time_before" attribute value. Time, in ticks, before the HSI timestamp, for the TriggerCandidate...
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...
conffwk entry point
double offset
std::ostream & operator<<(std::ostream &s, const AVXAbsRunSumProcessor &obj)
std::vector< constHSISignalWindow * >::const_iterator HSISignalWindowIterator
Including Qt Headers.