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 namespace confmodel {
29 class DaqModule;
30 class Session;
31 }
32}
33
34
35namespace dunedaq {
36 namespace appmodel {
37
39
40 friend class conffwk::Configuration;
41 friend class conffwk::DalObject;
42 friend class conffwk::DalFactory;
43 friend class conffwk::DalRegistry;
44
45 protected:
46
48 virtual ~FakeHSIApplication() 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
91
92
93 public:
94
95 // relationship names
96
97 inline static const std::string s_link_handler = "link_handler";
98 inline static const std::string s_generator = "generator";
99
100 static const std::string& __get_link_handler_str() noexcept { return s_link_handler; }
101 static const std::string& __get_generator_str() noexcept { return s_generator; }
102
103
112 {
113 std::lock_guard scoped_lock(m_mutex);
114 check();
115 check_init();
116 if (!m_link_handler)
117 {
118 std::ostringstream text;
119 text << "relationship \"" << s_link_handler << "\" of object " << this << " is not set";
120 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
121 }
122 return m_link_handler;
123 }
124
125
132 void
134
143 {
144 std::lock_guard scoped_lock(m_mutex);
145 check();
146 check_init();
147 if (!m_generator)
148 {
149 std::ostringstream text;
150 text << "relationship \"" << s_generator << "\" of object " << this << " is not set";
151 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
152 }
153 return m_generator;
154 }
155
156
163 void
165
166
167 public:
168
169 // user-defined algorithms
170
175 std::vector<const dunedaq::confmodel::DaqModule*> generate_modules(const confmodel::Session*) const override;
176 };
177
178 // out stream operator
179
180 inline std::ostream& operator<<(std::ostream& s, const FakeHSIApplication& obj)
181 {
182 return obj.print_object(s);
183 }
184
185 typedef std::vector<const FakeHSIApplication*>::const_iterator FakeHSIApplicationIterator;
186
187 }
188}
189
190#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 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
std::vector< const dunedaq::confmodel::DaqModule * > generate_modules(const confmodel::Session *) const override
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.