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 DaqModule;
29 class Session;
30 }
31}
32
33
34namespace dunedaq {
35 namespace appmodel {
36
38
39 friend class conffwk::Configuration;
40 friend class conffwk::DalObject;
41 friend class conffwk::DalFactory;
42 friend class conffwk::DalRegistry;
43
44 protected:
45
47 virtual ~MLTApplication() 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
88 std::string m_application_name;
91
92
93 public:
94
95 // attribute names
96
97 inline static const std::string s_application_name = "application_name";
98
99 static const std::string& __get_application_name_str() noexcept { return s_application_name; }
100
101
108 const std::string&
110 {
111 std::lock_guard scoped_lock(m_mutex);
112 check();
113 check_init();
114 return m_application_name;
115 }
116
123 void
124 set_application_name(const std::string& value)
125 {
126 std::lock_guard scoped_lock(m_mutex);
127 check();
128 clear();
130 }
131
132
133 // relationship names
134
135 inline static const std::string s_mlt_conf = "mlt_conf";
136 inline static const std::string s_standalone_candidate_maker_confs = "standalone_candidate_maker_confs";
137
138 static const std::string& __get_mlt_conf_str() noexcept { return s_mlt_conf; }
140
141
150 {
151 std::lock_guard scoped_lock(m_mutex);
152 check();
153 check_init();
154 if (!m_mlt_conf)
155 {
156 std::ostringstream text;
157 text << "relationship \"" << s_mlt_conf << "\" of object " << this << " is not set";
158 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
159 }
160 return m_mlt_conf;
161 }
162
163
170 void
172
179 const std::vector<const dunedaq::appmodel::StandaloneTCMakerConf*>&
181 {
182 std::lock_guard scoped_lock(m_mutex);
183 check();
184 check_init();
186 }
187
188
195 void
196 set_standalone_candidate_maker_confs(const std::vector<const dunedaq::appmodel::StandaloneTCMakerConf*>& value);
197
198
199 public:
200
201 // user-defined algorithms
202
207 std::vector<const dunedaq::confmodel::DaqModule*> generate_modules(const confmodel::Session*) const override;
208 };
209
210 // out stream operator
211
212 inline std::ostream& operator<<(std::ostream& s, const MLTApplication& obj)
213 {
214 return obj.print_object(s);
215 }
216
217 typedef std::vector<const MLTApplication*>::const_iterator MLTApplicationIterator;
218
219 }
220}
221
222#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.
const dunedaq::appmodel::MLTConf * m_mlt_conf
std::vector< const dunedaq::confmodel::DaqModule * > generate_modules(const confmodel::Session *) const override
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
virtual ~MLTApplication() noexcept
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.