DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
MLTApplication.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _MLTApplication_0_dunedaq__appmodel_0_appmodel_H_
4#define _MLTApplication_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 MLTConf;
25 class StandaloneTCMakerConf;
26 }
27}
28
29
30namespace dunedaq {
31 namespace appmodel {
32
33 class MLTApplication : public dunedaq::appmodel::TriggerApplication {
34
36 friend class conffwk::DalObject;
37 friend class conffwk::DalFactory;
39
40 protected:
41
43 virtual ~MLTApplication() noexcept;
44 virtual void init(bool init_children);
45
46 public:
47
50 static const std::string& s_class_name;
51
52
62 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
63
64
74 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
75
76
77 protected:
78
79 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
80
81
82 private:
83
85 const dunedaq::appmodel::MLTConf* m_mlt_conf;
87
88
89 public:
90
91 // attribute names
92
93 inline static const std::string s_application_name = "application_name";
94
95 static const std::string& __get_application_name_str() noexcept { return s_application_name; }
96
97
104 const std::string&
106 {
107 std::lock_guard scoped_lock(m_mutex);
108 check();
109 check_init();
110 return m_application_name;
111 }
112
119 void
120 set_application_name(const std::string& value)
121 {
122 std::lock_guard scoped_lock(m_mutex);
123 check();
124 clear();
126 }
127
128
129 // relationship names
130
131 inline static const std::string s_mlt_conf = "mlt_conf";
132 inline static const std::string s_standalone_candidate_maker_confs = "standalone_candidate_maker_confs";
133
134 static const std::string& __get_mlt_conf_str() noexcept { return s_mlt_conf; }
136
137
146 {
147 std::lock_guard scoped_lock(m_mutex);
148 check();
149 check_init();
150 if (!m_mlt_conf)
151 {
152 std::ostringstream text;
153 text << "relationship \"" << s_mlt_conf << "\" of object " << this << " is not set";
154 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
155 }
156 return m_mlt_conf;
157 }
158
159
166 void
168
175 const std::vector<const dunedaq::appmodel::StandaloneTCMakerConf*>&
177 {
178 std::lock_guard scoped_lock(m_mutex);
179 check();
180 check_init();
182 }
183
184
191 void
192 set_standalone_candidate_maker_confs(const std::vector<const dunedaq::appmodel::StandaloneTCMakerConf*>& value);
193
194
195 public:
196
197 // user-defined algorithms
198
203 void generate_modules(std::shared_ptr<appmodel::ConfigurationHelper>) const override;
204 };
205
206 // out stream operator
207
208 inline std::ostream& operator<<(std::ostream& s, const MLTApplication& obj)
209 {
210 return obj.print_object(s);
211 }
212
213 typedef std::vector<const MLTApplication*>::const_iterator MLTApplicationIterator;
214
215 }
216}
217
218#endif
#define ERS_HERE
void generate_modules(std::shared_ptr< appmodel::ConfigurationHelper >) const override
static const std::string & __get_application_name_str() noexcept
const std::vector< const dunedaq::appmodel::StandaloneTCMakerConf * > & get_standalone_candidate_maker_confs() const
Get "standalone_candidate_maker_confs" relationship value.
static const std::string s_mlt_conf
const dunedaq::appmodel::MLTConf * get_mlt_conf() const
Get "mlt_conf" relationship value.
const dunedaq::appmodel::MLTConf * m_mlt_conf
static const std::string & s_class_name
void set_mlt_conf(const dunedaq::appmodel::MLTConf *value)
Set "mlt_conf" relationship value.
static const std::string s_application_name
static const std::string & __get_standalone_candidate_maker_confs_str() noexcept
void set_standalone_candidate_maker_confs(const std::vector< const dunedaq::appmodel::StandaloneTCMakerConf * > &value)
Set "standalone_candidate_maker_confs" relationship value.
virtual void init(bool init_children)
const std::string & get_application_name() const
Get "application_name" attribute value.
MLTApplication(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
static const std::string & __get_mlt_conf_str() noexcept
static const std::string s_standalone_candidate_maker_confs
void set_application_name(const std::string &value)
Set "application_name" attribute 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::StandaloneTCMakerConf * > m_standalone_candidate_maker_confs
void set_by_ref(const std::string &name, T &value)
Set attribute value.
The base class for any generated DAL object.
Definition DalObject.hpp:45
std::mutex m_mutex
Used to protect changes of DAL object.
ConfigObject p_obj
Config object used by given template 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< constMLTApplication * >::const_iterator MLTApplicationIterator
Including Qt Headers.
msgpack::object obj