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 namespace confmodel {
28 class Session;
29 }
30}
31
32
33namespace dunedaq {
34 namespace appmodel {
35
36 class MLTApplication : public dunedaq::appmodel::TriggerApplication {
37
39 friend class conffwk::DalObject;
40 friend class conffwk::DalFactory;
42
43 protected:
44
46 virtual ~MLTApplication() noexcept;
47 virtual void init(bool init_children);
48
49 public:
50
53 static const std::string& s_class_name;
54
55
65 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
66
67
77 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
78
79
80 protected:
81
82 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
83
84
85 private:
86
88 const dunedaq::appmodel::MLTConf* m_mlt_conf;
90
91
92 public:
93
94 // attribute names
95
96 inline static const std::string s_application_name = "application_name";
97
98 static const std::string& __get_application_name_str() noexcept { return s_application_name; }
99
100
107 const std::string&
109 {
110 std::lock_guard scoped_lock(m_mutex);
111 check();
112 check_init();
113 return m_application_name;
114 }
115
122 void
123 set_application_name(const std::string& value)
124 {
125 std::lock_guard scoped_lock(m_mutex);
126 check();
127 clear();
129 }
130
131
132 // relationship names
133
134 inline static const std::string s_mlt_conf = "mlt_conf";
135 inline static const std::string s_standalone_candidate_maker_confs = "standalone_candidate_maker_confs";
136
137 static const std::string& __get_mlt_conf_str() noexcept { return s_mlt_conf; }
139
140
149 {
150 std::lock_guard scoped_lock(m_mutex);
151 check();
152 check_init();
153 if (!m_mlt_conf)
154 {
155 std::ostringstream text;
156 text << "relationship \"" << s_mlt_conf << "\" of object " << this << " is not set";
157 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
158 }
159 return m_mlt_conf;
160 }
161
162
169 void
171
178 const std::vector<const dunedaq::appmodel::StandaloneTCMakerConf*>&
180 {
181 std::lock_guard scoped_lock(m_mutex);
182 check();
183 check_init();
185 }
186
187
194 void
195 set_standalone_candidate_maker_confs(const std::vector<const dunedaq::appmodel::StandaloneTCMakerConf*>& value);
196
197
198 public:
199
200 // user-defined algorithms
201
206 void generate_modules(const confmodel::Session*) const override;
207 };
208
209 // out stream operator
210
211 inline std::ostream& operator<<(std::ostream& s, const MLTApplication& obj)
212 {
213 return obj.print_object(s);
214 }
215
216 typedef std::vector<const MLTApplication*>::const_iterator MLTApplicationIterator;
217
218 }
219}
220
221#endif
#define ERS_HERE
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.
void generate_modules(const confmodel::Session *) const override
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
The DUNE-DAQ namespace.
msgpack::object obj