DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
CTBStatisticsSocket.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _CTBStatisticsSocket_0_dunedaq__appmodel_0_appmodel_H_
4#define _CTBStatisticsSocket_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
20namespace dunedaq {
21 namespace appmodel {
22
27 class CTBStatisticsSocket : public dunedaq::confmodel::Jsonable {
28
30 friend class conffwk::DalObject;
31 friend class conffwk::DalFactory;
33
34 protected:
35
37 virtual ~CTBStatisticsSocket() noexcept;
38 virtual void init(bool init_children);
39
40 public:
41
44 static const std::string& s_class_name;
45
46
56 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
57
58
68 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
69
70
71 protected:
72
73 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
74
75
76 private:
77
78 uint64_t m_port;
79 uint32_t m_updt_period;
81
82
83 public:
84
85 // attribute names
86
87 inline static const std::string s_port = "port";
88 inline static const std::string s_updt_period = "updt_period";
89 inline static const std::string s_enable = "enable";
90
91 static const std::string& __get_port_str() noexcept { return s_port; }
92 static const std::string& __get_updt_period_str() noexcept { return s_updt_period; }
93 static const std::string& __get_enable_str() noexcept { return s_enable; }
94
95
102 uint64_t
103 get_port() const
104 {
105 std::lock_guard scoped_lock(m_mutex);
106 check();
107 check_init();
108 return m_port;
109 }
110
117 void
118 set_port(uint64_t value)
119 {
120 std::lock_guard scoped_lock(m_mutex);
121 check();
122 clear();
123 p_obj.set_by_val(s_port, value);
124 }
125
126
133 uint32_t
135 {
136 std::lock_guard scoped_lock(m_mutex);
137 check();
138 check_init();
139 return m_updt_period;
140 }
141
148 void
149 set_updt_period(uint32_t value)
150 {
151 std::lock_guard scoped_lock(m_mutex);
152 check();
153 clear();
155 }
156
157
164 bool
166 {
167 std::lock_guard scoped_lock(m_mutex);
168 check();
169 check_init();
170 return m_enable;
171 }
172
179 void
180 set_enable(bool value)
181 {
182 std::lock_guard scoped_lock(m_mutex);
183 check();
184 clear();
185 p_obj.set_by_val(s_enable, value);
186 }
187
188
189 };
190
191 // out stream operator
192
193 inline std::ostream& operator<<(std::ostream& s, const CTBStatisticsSocket& obj)
194 {
195 return obj.print_object(s);
196 }
197
198 typedef std::vector<const CTBStatisticsSocket*>::const_iterator CTBStatisticsSocketIterator;
199
200 }
201}
202
203#endif
CTBStatisticsSocket(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
uint32_t get_updt_period() const
Get "updt_period" attribute value.
static const std::string & __get_enable_str() noexcept
void set_port(uint64_t value)
Set "port" attribute value.
void set_enable(bool value)
Set "enable" attribute value.
virtual void init(bool init_children)
bool get_enable() const
Get "enable" attribute value.
static const std::string & __get_port_str() noexcept
uint64_t get_port() const
Get "port" attribute value.
void set_updt_period(uint32_t value)
Set "updt_period" attribute value.
static const std::string & __get_updt_period_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_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...
conffwk entry point
double offset
std::ostream & operator<<(std::ostream &s, const AVXAbsRunSumProcessor &obj)
std::vector< constCTBStatisticsSocket * >::const_iterator CTBStatisticsSocketIterator
Including Qt Headers.