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
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 ~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
88
89 public:
90
91 // attribute names
92
93 inline static const std::string s_metric_collect_opmon_rate = "metric_collect_opmon_rate";
94
95 static const std::string& __get_metric_collect_opmon_rate_str() noexcept { return s_metric_collect_opmon_rate; }
96
97
105 uint32_t
107 {
108 std::lock_guard scoped_lock(m_mutex);
109 check();
110 check_init();
112 }
113
121 void
123 {
124 std::lock_guard scoped_lock(m_mutex);
125 check();
126 clear();
128 }
129
130
131 // relationship names
132
133 inline static const std::string s_processing_steps = "processing_steps";
134 inline static const std::string s_sot_minima = "sot_minima";
135
136 static const std::string& __get_processing_steps_str() noexcept { return s_processing_steps; }
137 static const std::string& __get_sot_minima_str() noexcept { return s_sot_minima; }
138
139
146 const std::vector<const dunedaq::appmodel::ProcessingStep*>&
148 {
149 std::lock_guard scoped_lock(m_mutex);
150 check();
151 check_init();
152 if (m_processing_steps.empty())
153 {
154 std::ostringstream text;
155 text << "relationship \"" << s_processing_steps << "\" of object " << this << " is empty";
156 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
157 }
158 return m_processing_steps;
159 }
160
161
168 void
169 set_processing_steps(const std::vector<const dunedaq::appmodel::ProcessingStep*>& value);
170
180 {
181 std::lock_guard scoped_lock(m_mutex);
182 check();
183 check_init();
184 if (!m_sot_minima)
185 {
186 std::ostringstream text;
187 text << "relationship \"" << s_sot_minima << "\" of object " << this << " is not set";
188 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
189 }
190 return m_sot_minima;
191 }
192
193
201 void
203
204 };
205
206 // out stream operator
207
208 inline std::ostream& operator<<(std::ostream& s, const TPCRawDataProcessor& obj)
209 {
210 return obj.print_object(s);
211 }
212
213 typedef std::vector<const TPCRawDataProcessor*>::const_iterator TPCRawDataProcessorIterator;
214
215 }
216}
217
218#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_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_processing_steps_str() noexcept
TPCRawDataProcessor(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
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
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.
Definition DataStore.hpp:57
msgpack::object obj