DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
TriggerApplication.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _TriggerApplication_0_dunedaq__appmodel_0_appmodel_H_
4#define _TriggerApplication_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 DataReaderConf;
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 ~TriggerApplication() 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 std::string m_application_name;
89
90
91 public:
92
93 // attribute names
94
95 inline static const std::string s_application_name = "application_name";
96 inline static const std::string s_tx_generation_disabled = "tx_generation_disabled";
97
98 static const std::string& __get_application_name_str() noexcept { return s_application_name; }
99 static const std::string& __get_tx_generation_disabled_str() noexcept { return s_tx_generation_disabled; }
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
140 bool
142 {
143 std::lock_guard scoped_lock(m_mutex);
144 check();
145 check_init();
147 }
148
156 void
158 {
159 std::lock_guard scoped_lock(m_mutex);
160 check();
161 clear();
163 }
164
165
166 // relationship names
167
168 inline static const std::string s_data_subscriber = "data_subscriber";
169 inline static const std::string s_trigger_inputs_handler = "trigger_inputs_handler";
170
171 static const std::string& __get_data_subscriber_str() noexcept { return s_data_subscriber; }
172 static const std::string& __get_trigger_inputs_handler_str() noexcept { return s_trigger_inputs_handler; }
173
174
183 {
184 std::lock_guard scoped_lock(m_mutex);
185 check();
186 check_init();
188 {
189 std::ostringstream text;
190 text << "relationship \"" << s_data_subscriber << "\" of object " << this << " is not set";
191 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
192 }
193 return m_data_subscriber;
194 }
195
196
203 void
205
214 {
215 std::lock_guard scoped_lock(m_mutex);
216 check();
217 check_init();
219 {
220 std::ostringstream text;
221 text << "relationship \"" << s_trigger_inputs_handler << "\" of object " << this << " is not set";
222 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
223 }
225 }
226
227
234 void
236
237
238 public:
239
240 // user-defined algorithms
241
246 void generate_modules(std::shared_ptr<appmodel::ConfigurationHelper>) const override;
247 };
248
249 // out stream operator
250
251 inline std::ostream& operator<<(std::ostream& s, const TriggerApplication& obj)
252 {
253 return obj.print_object(s);
254 }
255
256 typedef std::vector<const TriggerApplication*>::const_iterator TriggerApplicationIterator;
257
258 }
259}
260
261#endif
#define ERS_HERE
void set_tx_generation_disabled(bool value)
Set "tx_generation_disabled" attribute value. Disable TA/TC generation as a post-processing task – on...
const std::string & get_application_name() const
Get "application_name" attribute value.
const dunedaq::appmodel::DataReaderConf * m_data_subscriber
const dunedaq::appmodel::DataHandlerConf * get_trigger_inputs_handler() const
Get "trigger_inputs_handler" relationship value.
const dunedaq::appmodel::DataReaderConf * get_data_subscriber() const
Get "data_subscriber" relationship value.
TriggerApplication(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
static const std::string & __get_data_subscriber_str() noexcept
static const std::string & __get_tx_generation_disabled_str() noexcept
bool get_tx_generation_disabled() const
Get "tx_generation_disabled" attribute value. Disable TA/TC generation as a post-processing task – on...
const dunedaq::appmodel::DataHandlerConf * m_trigger_inputs_handler
void set_data_subscriber(const dunedaq::appmodel::DataReaderConf *value)
Set "data_subscriber" relationship value.
void generate_modules(std::shared_ptr< appmodel::ConfigurationHelper >) const override
static const std::string & __get_trigger_inputs_handler_str() noexcept
static const std::string s_tx_generation_disabled
static const std::string s_trigger_inputs_handler
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...
void set_trigger_inputs_handler(const dunedaq::appmodel::DataHandlerConf *value)
Set "trigger_inputs_handler" relationship value.
virtual void init(bool init_children)
void set_application_name(const std::string &value)
Set "application_name" attribute value.
static const std::string & __get_application_name_str() noexcept
void set_by_val(const std::string &name, T value)
Set attribute value.
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< constTriggerApplication * >::const_iterator TriggerApplicationIterator
Including Qt Headers.
msgpack::object obj