DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
FelixDetectorToDaqConnection.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _FelixDetectorToDaqConnection_0_dunedaq__appmodel_0_appmodel_H_
4#define _FelixDetectorToDaqConnection_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 FelixDataReceiver;
25 class FelixDataSender;
26 }
27 namespace confmodel {
28 class DetDataReceiver;
29 class DetDataSender;
30 }
31}
32
33
34namespace dunedaq {
35 namespace appmodel {
36
37 class FelixDetectorToDaqConnection : public dunedaq::confmodel::DetectorToDaqConnection {
38
40 friend class conffwk::DalObject;
41 friend class conffwk::DalFactory;
43
44 protected:
45
47 virtual ~FelixDetectorToDaqConnection() noexcept;
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_felix_receiver = "felix_receiver";
97 inline static const std::string s_felix_senders = "felix_senders";
98
99 static const std::string& __get_felix_receiver_str() noexcept { return s_felix_receiver; }
100 static const std::string& __get_felix_senders_str() noexcept { return s_felix_senders; }
101
102
111 {
112 std::lock_guard scoped_lock(m_mutex);
113 check();
114 check_init();
115 if (!m_felix_receiver)
116 {
117 std::ostringstream text;
118 text << "relationship \"" << s_felix_receiver << "\" of object " << this << " is not set";
119 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
120 }
121 return m_felix_receiver;
122 }
123
124
131 void
133
140 const std::vector<const dunedaq::appmodel::FelixDataSender*>&
142 {
143 std::lock_guard scoped_lock(m_mutex);
144 check();
145 check_init();
146 return m_felix_senders;
147 }
148
149
156 void
157 set_felix_senders(const std::vector<const dunedaq::appmodel::FelixDataSender*>& value);
158
159
160 public:
161
162 // user-defined algorithms
163
164 const confmodel::DetDataReceiver* receiver() const override;
165
166
167 std::vector<const confmodel::DetDataSender*> senders() const override;
168 };
169
170 // out stream operator
171
172 inline std::ostream& operator<<(std::ostream& s, const FelixDetectorToDaqConnection& obj)
173 {
174 return obj.print_object(s);
175 }
176
177 typedef std::vector<const FelixDetectorToDaqConnection*>::const_iterator FelixDetectorToDaqConnectionIterator;
178
179 }
180}
181
182#endif
#define ERS_HERE
const dunedaq::appmodel::FelixDataReceiver * m_felix_receiver
const confmodel::DetDataReceiver * receiver() const override
const dunedaq::appmodel::FelixDataReceiver * get_felix_receiver() const
Get "felix_receiver" relationship value.
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...
std::vector< const dunedaq::appmodel::FelixDataSender * > m_felix_senders
std::vector< const confmodel::DetDataSender * > senders() const override
static const std::string & __get_felix_receiver_str() noexcept
static const std::string & __get_felix_senders_str() noexcept
void set_felix_receiver(const dunedaq::appmodel::FelixDataReceiver *value)
Set "felix_receiver" relationship value.
FelixDetectorToDaqConnection(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
const std::vector< const dunedaq::appmodel::FelixDataSender * > & get_felix_senders() const
Get "felix_senders" relationship value.
void set_felix_senders(const std::vector< const dunedaq::appmodel::FelixDataSender * > &value)
Set "felix_senders" relationship value.
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::vector< constFelixDetectorToDaqConnection * >::const_iterator FelixDetectorToDaqConnectionIterator
std::ostream & operator<<(std::ostream &s, const AVXAbsRunSumProcessor &obj)
The DUNE-DAQ namespace.
Definition DataStore.hpp:57
msgpack::object obj