DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
NetworkDetectorToDaqConnection.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _NetworkDetectorToDaqConnection_0_dunedaq__appmodel_0_appmodel_H_
4#define _NetworkDetectorToDaqConnection_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 NWDetDataReceiver;
25 class NWDetDataSender;
26 }
27 namespace confmodel {
28 class DetDataReceiver;
29 class DetDataSender;
30 }
31}
32
33
34namespace dunedaq {
35 namespace appmodel {
36
38
39 friend class conffwk::Configuration;
40 friend class conffwk::DalObject;
41 friend class conffwk::DalFactory;
42 friend class conffwk::DalRegistry;
43
44 protected:
45
48 virtual void init(bool init_children);
49
50 public:
51
54 static const std::string& s_class_name;
55
56
66 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
67
68
78 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
79
80
81 protected:
82
83 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
84
85
86 private:
87
90
91
92 public:
93
94 // relationship names
95
96 inline static const std::string s_net_senders = "net_senders";
97 inline static const std::string s_net_receiver = "net_receiver";
98
99 static const std::string& __get_net_senders_str() noexcept { return s_net_senders; }
100 static const std::string& __get_net_receiver_str() noexcept { return s_net_receiver; }
101
102
110 const std::vector<const dunedaq::appmodel::NWDetDataSender*>&
112 {
113 std::lock_guard scoped_lock(m_mutex);
114 check();
115 check_init();
116 return m_net_senders;
117 }
118
119
127 void
128 set_net_senders(const std::vector<const dunedaq::appmodel::NWDetDataSender*>& value);
129
138 {
139 std::lock_guard scoped_lock(m_mutex);
140 check();
141 check_init();
142 if (!m_net_receiver)
143 {
144 std::ostringstream text;
145 text << "relationship \"" << s_net_receiver << "\" of object " << this << " is not set";
146 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
147 }
148 return m_net_receiver;
149 }
150
151
158 void
160
161
162 public:
163
164 // user-defined algorithms
165
170 std::vector<const confmodel::DetDataSender*> senders() const override;
171
172
177 const confmodel::DetDataReceiver* receiver() const override;
178 };
179
180 // out stream operator
181
182 inline std::ostream& operator<<(std::ostream& s, const NetworkDetectorToDaqConnection& obj)
183 {
184 return obj.print_object(s);
185 }
186
187 typedef std::vector<const NetworkDetectorToDaqConnection*>::const_iterator NetworkDetectorToDaqConnectionIterator;
188
189 }
190}
191
192#endif
#define ERS_HERE
std::vector< const dunedaq::appmodel::NWDetDataSender * > m_net_senders
const dunedaq::appmodel::NWDetDataReceiver * get_net_receiver() const
Get "net_receiver" relationship value.
const confmodel::DetDataReceiver * receiver() const override
std::vector< const confmodel::DetDataSender * > senders() const override
void set_net_senders(const std::vector< const dunedaq::appmodel::NWDetDataSender * > &value)
Set "net_senders" relationship value. A collection of Network detector sending objects.
NetworkDetectorToDaqConnection(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
void set_net_receiver(const dunedaq::appmodel::NWDetDataReceiver *value)
Set "net_receiver" relationship value.
const std::vector< const dunedaq::appmodel::NWDetDataSender * > & get_net_senders() const
Get "net_senders" relationship value. A collection of Network detector sending objects.
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::NWDetDataReceiver * m_net_receiver
The base class for any generated DAL object.
Definition DalObject.hpp:45
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< constNetworkDetectorToDaqConnection * >::const_iterator NetworkDetectorToDaqConnectionIterator
The DUNE-DAQ namespace.
Definition DataStore.hpp:57
msgpack::object obj