DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
SocketDataWriterModule.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _SocketDataWriterModule_0_dunedaq__appmodel_0_appmodel_H_
4#define _SocketDataWriterModule_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 DataMoveCallbackConf;
25 class NetworkDetectorToDaqConnection;
26 class SocketDataWriterConf;
27 }
28}
29
30
31namespace dunedaq {
32 namespace appmodel {
33
35
36 friend class conffwk::Configuration;
37 friend class conffwk::DalObject;
38 friend class conffwk::DalFactory;
39 friend class conffwk::DalRegistry;
40
41 protected:
42
44 virtual ~SocketDataWriterModule() noexcept;
45 virtual void init(bool init_children);
46
47 public:
48
51 static const std::string& s_class_name;
52
53
63 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
64
65
75 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
76
77
78 protected:
79
80 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
81
82
83 private:
84
88
89
90 public:
91
92 // relationship names
93
94 inline static const std::string s_configuration = "configuration";
95 inline static const std::string s_connections = "connections";
96 inline static const std::string s_raw_data_callback = "raw_data_callback";
97
98 static const std::string& __get_configuration_str() noexcept { return s_configuration; }
99 static const std::string& __get_connections_str() noexcept { return s_connections; }
100 static const std::string& __get_raw_data_callback_str() noexcept { return s_raw_data_callback; }
101
102
111 {
112 std::lock_guard scoped_lock(m_mutex);
113 check();
114 check_init();
115 if (!m_configuration)
116 {
117 std::ostringstream text;
118 text << "relationship \"" << s_configuration << "\" of object " << this << " is not set";
119 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
120 }
121 return m_configuration;
122 }
123
124
131 void
133
140 const std::vector<const dunedaq::appmodel::NetworkDetectorToDaqConnection*>&
142 {
143 std::lock_guard scoped_lock(m_mutex);
144 check();
145 check_init();
146 if (m_connections.empty())
147 {
148 std::ostringstream text;
149 text << "relationship \"" << s_connections << "\" of object " << this << " is empty";
150 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
151 }
152 return m_connections;
153 }
154
155
162 void
163 set_connections(const std::vector<const dunedaq::appmodel::NetworkDetectorToDaqConnection*>& value);
164
174 {
175 std::lock_guard scoped_lock(m_mutex);
176 check();
177 check_init();
179 {
180 std::ostringstream text;
181 text << "relationship \"" << s_raw_data_callback << "\" of object " << this << " is not set";
182 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
183 }
184 return m_raw_data_callback;
185 }
186
187
195 void
197
198 };
199
200 // out stream operator
201
202 inline std::ostream& operator<<(std::ostream& s, const SocketDataWriterModule& obj)
203 {
204 return obj.print_object(s);
205 }
206
207 typedef std::vector<const SocketDataWriterModule*>::const_iterator SocketDataWriterModuleIterator;
208
209 }
210}
211
212#endif
#define ERS_HERE
const dunedaq::appmodel::SocketDataWriterConf * m_configuration
void set_connections(const std::vector< const dunedaq::appmodel::NetworkDetectorToDaqConnection * > &value)
Set "connections" relationship value.
std::vector< const dunedaq::appmodel::NetworkDetectorToDaqConnection * > m_connections
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 dunedaq::appmodel::DataMoveCallbackConf * m_raw_data_callback
const dunedaq::appmodel::DataMoveCallbackConf * get_raw_data_callback() const
Get "raw_data_callback" relationship value. Configuration for raw data callback.
static const std::string & __get_configuration_str() noexcept
void set_configuration(const dunedaq::appmodel::SocketDataWriterConf *value)
Set "configuration" relationship value.
static const std::string & __get_raw_data_callback_str() noexcept
const dunedaq::appmodel::SocketDataWriterConf * get_configuration() const
Get "configuration" relationship value.
const std::vector< const dunedaq::appmodel::NetworkDetectorToDaqConnection * > & get_connections() const
Get "connections" relationship value.
void set_raw_data_callback(const dunedaq::appmodel::DataMoveCallbackConf *value)
Set "raw_data_callback" relationship value. Configuration for raw data callback.
SocketDataWriterModule(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
static const std::string & __get_connections_str() noexcept
The base class for any generated DAL object.
Definition DalObject.hpp:45
Configuration & configuration() const noexcept
std::mutex m_mutex
Used to protect changes of DAL 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< constSocketDataWriterModule * >::const_iterator SocketDataWriterModuleIterator
Including Qt Headers.
msgpack::object obj