DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
FakeHSIApplication.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _FakeHSIApplication_0_dunedaq__appmodel_0_appmodel_H_
4#define _FakeHSIApplication_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 FakeHSIEventGeneratorConf;
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 ~FakeHSIApplication() 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
85 const dunedaq::appmodel::DataHandlerConf* m_link_handler;
87
88
89 public:
90
91 // relationship names
92
93 inline static const std::string s_link_handler = "link_handler";
94 inline static const std::string s_generator = "generator";
95
96 static const std::string& __get_link_handler_str() noexcept { return s_link_handler; }
97 static const std::string& __get_generator_str() noexcept { return s_generator; }
98
99
108 {
109 std::lock_guard scoped_lock(m_mutex);
110 check();
111 check_init();
112 if (!m_link_handler)
113 {
114 std::ostringstream text;
115 text << "relationship \"" << s_link_handler << "\" of object " << this << " is not set";
116 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
117 }
118 return m_link_handler;
119 }
120
121
128 void
130
139 {
140 std::lock_guard scoped_lock(m_mutex);
141 check();
142 check_init();
143 if (!m_generator)
144 {
145 std::ostringstream text;
146 text << "relationship \"" << s_generator << "\" of object " << this << " is not set";
147 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
148 }
149 return m_generator;
150 }
151
152
159 void
161
162
163 public:
164
165 // user-defined algorithms
166
171 void generate_modules(std::shared_ptr<appmodel::ConfigurationHelper>) const override;
172 };
173
174 // out stream operator
175
176 inline std::ostream& operator<<(std::ostream& s, const FakeHSIApplication& obj)
177 {
178 return obj.print_object(s);
179 }
180
181 typedef std::vector<const FakeHSIApplication*>::const_iterator FakeHSIApplicationIterator;
182
183 }
184}
185
186#endif
#define ERS_HERE
const dunedaq::appmodel::DataHandlerConf * get_link_handler() const
Get "link_handler" relationship value.
void set_generator(const dunedaq::appmodel::FakeHSIEventGeneratorConf *value)
Set "generator" relationship value.
virtual void init(bool init_children)
static const std::string & __get_link_handler_str() noexcept
void generate_modules(std::shared_ptr< appmodel::ConfigurationHelper >) const override
void set_link_handler(const dunedaq::appmodel::DataHandlerConf *value)
Set "link_handler" 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...
const dunedaq::appmodel::FakeHSIEventGeneratorConf * m_generator
static const std::string & __get_generator_str() noexcept
FakeHSIApplication(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
const dunedaq::appmodel::FakeHSIEventGeneratorConf * get_generator() const
Get "generator" relationship value.
const dunedaq::appmodel::DataHandlerConf * m_link_handler
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< constFakeHSIApplication * >::const_iterator FakeHSIApplicationIterator
Including Qt Headers.
msgpack::object obj