DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
DaphneApplication.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _DaphneApplication_0_dunedaq__appmodel_0_appmodel_H_
4#define _DaphneApplication_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
20
21 // forward declaration for classes used in relationships and algorithms
22
23namespace dunedaq {
24 namespace appmodel {
25 class DaphneConf;
26 class HermesModuleConf;
27 }
28 namespace confmodel {
29 class DetectorToDaqConnection;
30 class Session;
31 }
32}
33
34
35namespace dunedaq {
36 namespace appmodel {
37
39
41 friend class conffwk::DalObject;
42 friend class conffwk::DalFactory;
44
45 protected:
46
48 virtual ~DaphneApplication() noexcept;
49 virtual void init(bool init_children);
50
51 public:
52
55 static const std::string& s_class_name;
56
57
67 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
68
69
79 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
80
81
82 protected:
83
84 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
85
86
87 private:
88
90 std::vector<const dunedaq::confmodel::DetectorToDaqConnection*> m_detector_connections;
92
93
94 public:
95
96 // relationship names
97
98 inline static const std::string s_configuration = "configuration";
99 inline static const std::string s_detector_connections = "detector_connections";
100 inline static const std::string s_hermes_module_conf = "hermes_module_conf";
101
102 static const std::string& __get_configuration_str() noexcept { return s_configuration; }
103 static const std::string& __get_detector_connections_str() noexcept { return s_detector_connections; }
104 static const std::string& __get_hermes_module_conf_str() noexcept { return s_hermes_module_conf; }
105
106
115 {
116 std::lock_guard scoped_lock(m_mutex);
117 check();
118 check_init();
119 if (!m_configuration)
120 {
121 std::ostringstream text;
122 text << "relationship \"" << s_configuration << "\" of object " << this << " is not set";
123 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
124 }
125 return m_configuration;
126 }
127
128
135 void
137
145 const std::vector<const dunedaq::confmodel::DetectorToDaqConnection*>&
147 {
148 std::lock_guard scoped_lock(m_mutex);
149 check();
150 check_init();
152 }
153
154
162 void
163 set_detector_connections(const std::vector<const dunedaq::confmodel::DetectorToDaqConnection*>& value);
164
173 {
174 std::lock_guard scoped_lock(m_mutex);
175 check();
176 check_init();
178 }
179
180
187 void
189
190
191 public:
192
193 // user-defined algorithms
194
199 void generate_modules(const confmodel::Session*) const override;
200
201
202 virtual std::vector<const Resource*> contained_resources() const override;
203 };
204
205 // out stream operator
206
207 inline std::ostream& operator<<(std::ostream& s, const DaphneApplication& obj)
208 {
209 return obj.print_object(s);
210 }
211
212 typedef std::vector<const DaphneApplication*>::const_iterator DaphneApplicationIterator;
213
214 }
215}
216
217#endif
#define ERS_HERE
virtual void init(bool init_children)
DaphneApplication(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
void set_detector_connections(const std::vector< const dunedaq::confmodel::DetectorToDaqConnection * > &value)
Set "detector_connections" relationship value. List of detector components controlled by this applica...
const std::vector< const dunedaq::confmodel::DetectorToDaqConnection * > & get_detector_connections() const
Get "detector_connections" relationship value. List of detector components controlled by this applica...
void set_configuration(const dunedaq::appmodel::DaphneConf *value)
Set "configuration" relationship value.
static const std::string & s_class_name
void generate_modules(const confmodel::Session *) const override
std::vector< const dunedaq::confmodel::DetectorToDaqConnection * > m_detector_connections
static const std::string s_detector_connections
static const std::string s_hermes_module_conf
const dunedaq::appmodel::DaphneConf * m_configuration
static const std::string & __get_configuration_str() noexcept
const dunedaq::appmodel::HermesModuleConf * m_hermes_module_conf
void set_hermes_module_conf(const dunedaq::appmodel::HermesModuleConf *value)
Set "hermes_module_conf" 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...
static const std::string & __get_detector_connections_str() noexcept
virtual std::vector< const Resource * > contained_resources() const override
static const std::string & __get_hermes_module_conf_str() noexcept
const dunedaq::appmodel::HermesModuleConf * get_hermes_module_conf() const
Get "hermes_module_conf" relationship value.
const dunedaq::appmodel::DaphneConf * get_configuration() const
Get "configuration" relationship value.
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< constDaphneApplication * >::const_iterator DaphneApplicationIterator
The DUNE-DAQ namespace.
msgpack::object obj