DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
ROIGroupConf.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _ROIGroupConf_0_dunedaq__appmodel_0_appmodel_H_
4#define _ROIGroupConf_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 ~ROIGroupConf() 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
72 float m_probability;
73 uint32_t m_time_window;
75
76
77 public:
78
79 // attribute names
80
81 inline static const std::string s_number_of_link_groups = "number_of_link_groups";
82 inline static const std::string s_probability = "probability";
83 inline static const std::string s_time_window = "time_window";
84 inline static const std::string s_groups_selection_mode = "groups_selection_mode";
85
86 static const std::string& __get_number_of_link_groups_str() noexcept { return s_number_of_link_groups; }
87 static const std::string& __get_probability_str() noexcept { return s_probability; }
88 static const std::string& __get_time_window_str() noexcept { return s_time_window; }
89 static const std::string& __get_groups_selection_mode_str() noexcept { return s_groups_selection_mode; }
90
91
99 uint32_t
101 {
102 std::lock_guard scoped_lock(m_mutex);
103 check();
104 check_init();
106 }
107
115 void
117 {
118 std::lock_guard scoped_lock(m_mutex);
119 check();
120 clear();
122 }
123
124
132 float
134 {
135 std::lock_guard scoped_lock(m_mutex);
136 check();
137 check_init();
138 return m_probability;
139 }
140
148 void
149 set_probability(float 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_window;
172 }
173
181 void
182 set_time_window(uint32_t value)
183 {
184 std::lock_guard scoped_lock(m_mutex);
185 check();
186 clear();
188 }
189
190
196 inline static const std::string KRandom = "kRandom";
197 inline static const std::string KSequential = "kSequential";
198 };
199
207 const std::string&
209 {
210 std::lock_guard scoped_lock(m_mutex);
211 check();
212 check_init();
214 }
215
223 void
224 set_groups_selection_mode(const std::string& value)
225 {
226 std::lock_guard scoped_lock(m_mutex);
227 check();
228 clear();
230 }
231
232
233 };
234
235 // out stream operator
236
237 inline std::ostream& operator<<(std::ostream& s, const ROIGroupConf& obj)
238 {
239 return obj.print_object(s);
240 }
241
242 typedef std::vector<const ROIGroupConf*>::const_iterator ROIGroupConfIterator;
243
244 }
245}
246
247#endif
void set_time_window(uint32_t value)
Set "time_window" attribute value. Time window to read out pre/post decision, [clock ticks] (currentl...
static const std::string s_time_window
static const std::string & __get_probability_str() noexcept
static const std::string s_number_of_link_groups
void set_groups_selection_mode(const std::string &value)
Set "groups_selection_mode" attribute value. Whether to read out random groups or in sequence (curren...
static const std::string & __get_groups_selection_mode_str() noexcept
void set_number_of_link_groups(uint32_t value)
Set "number_of_link_groups" attribute value. Number of groups of links to readout.
static const std::string s_groups_selection_mode
uint32_t get_number_of_link_groups() const
Get "number_of_link_groups" attribute value. Number of groups of links to readout.
float get_probability() const
Get "probability" attribute value. Probability to select this configuration [0 to 1] (currently not u...
static const std::string s_probability
static const std::string & s_class_name
friend class conffwk::DalFactory
static const std::string & __get_time_window_str() noexcept
virtual void init(bool init_children)
void set_probability(float value)
Set "probability" attribute value. Probability to select this configuration [0 to 1] (currently not u...
const std::string & get_groups_selection_mode() const
Get "groups_selection_mode" attribute value. Whether to read out random groups or in sequence (curren...
uint32_t get_time_window() const
Get "time_window" attribute value. Time window to read out pre/post decision, [clock ticks] (currentl...
friend class conffwk::DalObject
ROIGroupConf(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
static const std::string & __get_number_of_link_groups_str() noexcept
virtual ~ROIGroupConf() 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_by_val(const std::string &name, T value)
Set attribute value.
void set_enum(const std::string &name, const std::string &value)
Set attribute enumeration 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< constROIGroupConf * >::const_iterator ROIGroupConfIterator
Including Qt Headers.