DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
TPCRawDataProcessor.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _TPCRawDataProcessor_0_dunedaq__appmodel_0_appmodel_H_
4#define _TPCRawDataProcessor_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
33 class TPCRawDataProcessor : public dunedaq::appmodel::RawDataProcessor {
34
36 friend class conffwk::DalObject;
37 friend class conffwk::DalFactory;
39
40 protected:
41
43 virtual ~TPCRawDataProcessor() 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
87 std::vector<const dunedaq::appmodel::ProcessingStep*> m_processing_steps;
89
90
91 public:
92
93 // attribute names
94
95 inline static const std::string s_frame_count_limit = "frame_count_limit";
96 inline static const std::string s_tp_count_limit = "tp_count_limit";
97 inline static const std::string s_metric_collect_opmon_rate = "metric_collect_opmon_rate";
98
99 static const std::string& __get_frame_count_limit_str() noexcept { return s_frame_count_limit; }
100 static const std::string& __get_tp_count_limit_str() noexcept { return s_tp_count_limit; }
101 static const std::string& __get_metric_collect_opmon_rate_str() noexcept { return s_metric_collect_opmon_rate; }
102
103
111 uint32_t
113 {
114 std::lock_guard scoped_lock(m_mutex);
115 check();
116 check_init();
117 return m_frame_count_limit;
118 }
119
127 void
128 set_frame_count_limit(uint32_t value)
129 {
130 std::lock_guard scoped_lock(m_mutex);
131 check();
132 clear();
134 }
135
136
144 uint32_t
146 {
147 std::lock_guard scoped_lock(m_mutex);
148 check();
149 check_init();
150 return m_tp_count_limit;
151 }
152
160 void
161 set_tp_count_limit(uint32_t value)
162 {
163 std::lock_guard scoped_lock(m_mutex);
164 check();
165 clear();
167 }
168
169
177 uint32_t
179 {
180 std::lock_guard scoped_lock(m_mutex);
181 check();
182 check_init();
184 }
185
193 void
195 {
196 std::lock_guard scoped_lock(m_mutex);
197 check();
198 clear();
200 }
201
202
203 // relationship names
204
205 inline static const std::string s_processing_steps = "processing_steps";
206 inline static const std::string s_sot_minima = "sot_minima";
207
208 static const std::string& __get_processing_steps_str() noexcept { return s_processing_steps; }
209 static const std::string& __get_sot_minima_str() noexcept { return s_sot_minima; }
210
211
218 const std::vector<const dunedaq::appmodel::ProcessingStep*>&
220 {
221 std::lock_guard scoped_lock(m_mutex);
222 check();
223 check_init();
224 if (m_processing_steps.empty())
225 {
226 std::ostringstream text;
227 text << "relationship \"" << s_processing_steps << "\" of object " << this << " is empty";
228 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
229 }
230 return m_processing_steps;
231 }
232
233
240 void
241 set_processing_steps(const std::vector<const dunedaq::appmodel::ProcessingStep*>& value);
242
252 {
253 std::lock_guard scoped_lock(m_mutex);
254 check();
255 check_init();
256 if (!m_sot_minima)
257 {
258 std::ostringstream text;
259 text << "relationship \"" << s_sot_minima << "\" of object " << this << " is not set";
260 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
261 }
262 return m_sot_minima;
263 }
264
265
273 void
275
276 };
277
278 // out stream operator
279
280 inline std::ostream& operator<<(std::ostream& s, const TPCRawDataProcessor& obj)
281 {
282 return obj.print_object(s);
283 }
284
285 typedef std::vector<const TPCRawDataProcessor*>::const_iterator TPCRawDataProcessorIterator;
286
287 }
288}
289
290#endif
#define ERS_HERE
void set_sot_minima(const dunedaq::appmodel::SamplesOverThresholdMinima *value)
Set "sot_minima" relationship value. TP samples over threshold minimum requirement by plane.
void set_frame_count_limit(uint32_t value)
Set "frame_count_limit" attribute value. When this number of frames is reached the TPs are sent to th...
static const std::string & __get_frame_count_limit_str() noexcept
void set_metric_collect_opmon_rate(uint32_t value)
Set "metric_collect_opmon_rate" attribute value. The rate at which processor metric is polled from pr...
std::vector< const dunedaq::appmodel::ProcessingStep * > m_processing_steps
static const std::string & __get_sot_minima_str() noexcept
static const std::string & __get_tp_count_limit_str() noexcept
uint32_t get_frame_count_limit() const
Get "frame_count_limit" attribute value. When this number of frames is reached the TPs are sent to th...
static const std::string & __get_processing_steps_str() noexcept
TPCRawDataProcessor(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
void set_tp_count_limit(uint32_t value)
Set "tp_count_limit" attribute value. When this number of TPs is reached, the TPs are sent to the sin...
const dunedaq::appmodel::SamplesOverThresholdMinima * m_sot_minima
virtual void init(bool init_children)
const dunedaq::appmodel::SamplesOverThresholdMinima * get_sot_minima() const
Get "sot_minima" relationship value. TP samples over threshold minimum requirement by plane.
const std::vector< const dunedaq::appmodel::ProcessingStep * > & get_processing_steps() const
Get "processing_steps" relationship value.
static const std::string & __get_metric_collect_opmon_rate_str() noexcept
void set_processing_steps(const std::vector< const dunedaq::appmodel::ProcessingStep * > &value)
Set "processing_steps" relationship value.
uint32_t get_metric_collect_opmon_rate() const
Get "metric_collect_opmon_rate" attribute value. The rate at which processor metric is polled from pr...
static const std::string s_metric_collect_opmon_rate
uint32_t get_tp_count_limit() const
Get "tp_count_limit" attribute value. When this number of TPs is reached, the TPs are sent to the sin...
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_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< constTPCRawDataProcessor * >::const_iterator TPCRawDataProcessorIterator
The DUNE-DAQ namespace.
msgpack::object obj