DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
RawDataProcessor.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _RawDataProcessor_0_dunedaq__appmodel_0_appmodel_H_
4#define _RawDataProcessor_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 ProcessingStep;
25 class SamplesOverThresholdMinima;
26 }
27}
28
29
30namespace dunedaq {
31 namespace appmodel {
32
34
35 friend class conffwk::Configuration;
36 friend class conffwk::DalObject;
37 friend class conffwk::DalFactory;
38 friend class conffwk::DalRegistry;
39
40 protected:
41
43 virtual ~RawDataProcessor() noexcept;
44 virtual void init(bool init_children);
45
46 public:
47
50 static const std::string& s_class_name;
51
52
62 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
63
64
74 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
75
76
77 protected:
78
79 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
80
81
82 private:
83
84 std::vector<uint32_t> m_channel_mask;
85 std::string m_channel_map;
88
89
90 public:
91
92 // attribute names
93
94 inline static const std::string s_channel_mask = "channel_mask";
95 inline static const std::string s_channel_map = "channel_map";
96
97 static const std::string& __get_channel_mask_str() noexcept { return s_channel_mask; }
98 static const std::string& __get_channel_map_str() noexcept { return s_channel_map; }
99
100
108 const std::vector<uint32_t>&
110 {
111 std::lock_guard scoped_lock(m_mutex);
112 check();
113 check_init();
114 return m_channel_mask;
115 }
116
124 void
125 set_channel_mask(const std::vector<uint32_t>& value)
126 {
127 std::lock_guard scoped_lock(m_mutex);
128 check();
129 clear();
131 }
132
133
140 const std::string&
142 {
143 std::lock_guard scoped_lock(m_mutex);
144 check();
145 check_init();
146 return m_channel_map;
147 }
148
155 void
156 set_channel_map(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_processing_steps = "processing_steps";
168 inline static const std::string s_sot_minima = "sot_minima";
169
170 static const std::string& __get_processing_steps_str() noexcept { return s_processing_steps; }
171 static const std::string& __get_sot_minima_str() noexcept { return s_sot_minima; }
172
173
180 const std::vector<const dunedaq::appmodel::ProcessingStep*>&
182 {
183 std::lock_guard scoped_lock(m_mutex);
184 check();
185 check_init();
186 if (m_processing_steps.empty())
187 {
188 std::ostringstream text;
189 text << "relationship \"" << s_processing_steps << "\" of object " << this << " is empty";
190 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
191 }
192 return m_processing_steps;
193 }
194
195
202 void
203 set_processing_steps(const std::vector<const dunedaq::appmodel::ProcessingStep*>& value);
204
214 {
215 std::lock_guard scoped_lock(m_mutex);
216 check();
217 check_init();
218 if (!m_sot_minima)
219 {
220 std::ostringstream text;
221 text << "relationship \"" << s_sot_minima << "\" of object " << this << " is not set";
222 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
223 }
224 return m_sot_minima;
225 }
226
227
235 void
237
238 };
239
240 // out stream operator
241
242 inline std::ostream& operator<<(std::ostream& s, const RawDataProcessor& obj)
243 {
244 return obj.print_object(s);
245 }
246
247 typedef std::vector<const RawDataProcessor*>::const_iterator RawDataProcessorIterator;
248
249 }
250}
251
252#endif
#define ERS_HERE
std::vector< const dunedaq::appmodel::ProcessingStep * > m_processing_steps
const std::vector< const dunedaq::appmodel::ProcessingStep * > & get_processing_steps() const
Get "processing_steps" relationship value.
static const std::string & __get_sot_minima_str() noexcept
virtual void init(bool init_children)
static const std::string & __get_processing_steps_str() noexcept
void set_channel_map(const std::string &value)
Set "channel_map" attribute value.
const std::vector< uint32_t > & get_channel_mask() const
Get "channel_mask" attribute value. List of channels to be masked from TP generation.
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::string & get_channel_map() const
Get "channel_map" attribute value.
const dunedaq::appmodel::SamplesOverThresholdMinima * get_sot_minima() const
Get "sot_minima" relationship value. TP samples over threshold minimum requirement by plane.
const dunedaq::appmodel::SamplesOverThresholdMinima * m_sot_minima
static const std::string s_processing_steps
RawDataProcessor(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
static const std::string & __get_channel_map_str() noexcept
static const std::string s_channel_map
void set_sot_minima(const dunedaq::appmodel::SamplesOverThresholdMinima *value)
Set "sot_minima" relationship value. TP samples over threshold minimum requirement by plane.
void set_channel_mask(const std::vector< uint32_t > &value)
Set "channel_mask" attribute value. List of channels to be masked from TP generation.
static const std::string & __get_channel_mask_str() noexcept
virtual ~RawDataProcessor() noexcept
void set_processing_steps(const std::vector< const dunedaq::appmodel::ProcessingStep * > &value)
Set "processing_steps" relationship value.
static const std::string s_channel_mask
static const std::string & s_class_name
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::ostream & operator<<(std::ostream &s, const AVXAbsRunSumProcessor &obj)
std::vector< constRawDataProcessor * >::const_iterator RawDataProcessorIterator
Including Qt Headers.