DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
DTSHSIApplication.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _DTSHSIApplication_0_dunedaq__appmodel_0_appmodel_H_
4#define _DTSHSIApplication_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 DataHandlerConf;
26 class HSIReadoutConf;
27 }
28 namespace confmodel {
29 class Session;
30 }
31}
32
33
34namespace dunedaq {
35 namespace appmodel {
36
37 class DTSHSIApplication : public dunedaq::appmodel::SmartDaqApplication, public dunedaq::confmodel::Resource {
38
40 friend class conffwk::DalObject;
41 friend class conffwk::DalFactory;
43
44 protected:
45
47 virtual ~DTSHSIApplication() 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_link_handler = "link_handler";
97 inline static const std::string s_generator = "generator";
98
99 static const std::string& __get_link_handler_str() noexcept { return s_link_handler; }
100 static const std::string& __get_generator_str() noexcept { return s_generator; }
101
102
111 {
112 std::lock_guard scoped_lock(m_mutex);
113 check();
114 check_init();
115 if (!m_link_handler)
116 {
117 std::ostringstream text;
118 text << "relationship \"" << s_link_handler << "\" of object " << this << " is not set";
119 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
120 }
121 return m_link_handler;
122 }
123
124
131 void
133
142 {
143 std::lock_guard scoped_lock(m_mutex);
144 check();
145 check_init();
146 if (!m_generator)
147 {
148 std::ostringstream text;
149 text << "relationship \"" << s_generator << "\" of object " << this << " is not set";
150 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
151 }
152 return m_generator;
153 }
154
155
162 void
164
165
166 public:
167
168 // user-defined algorithms
169
174 void generate_modules(const confmodel::Session*) const override;
175 };
176
177 // out stream operator
178
179 inline std::ostream& operator<<(std::ostream& s, const DTSHSIApplication& obj)
180 {
181 return obj.print_object(s);
182 }
183
184 typedef std::vector<const DTSHSIApplication*>::const_iterator DTSHSIApplicationIterator;
185
186 }
187}
188
189#endif
#define ERS_HERE
const dunedaq::appmodel::DataHandlerConf * get_link_handler() const
Get "link_handler" relationship value.
DTSHSIApplication(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
static const std::string & __get_link_handler_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...
const dunedaq::appmodel::DataHandlerConf * m_link_handler
static const std::string & s_class_name
const dunedaq::appmodel::HSIReadoutConf * m_generator
const dunedaq::appmodel::HSIReadoutConf * get_generator() const
Get "generator" relationship value.
static const std::string & __get_generator_str() noexcept
void set_generator(const dunedaq::appmodel::HSIReadoutConf *value)
Set "generator" relationship value.
virtual void init(bool init_children)
void generate_modules(const confmodel::Session *) const override
void set_link_handler(const dunedaq::appmodel::DataHandlerConf *value)
Set "link_handler" 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::ostream & operator<<(std::ostream &s, const AVXAbsRunSumProcessor &obj)
std::vector< constDTSHSIApplication * >::const_iterator DTSHSIApplicationIterator
The DUNE-DAQ namespace.
msgpack::object obj