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 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 ~TriggerApplication() 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
89 std::string m_application_name;
93
94
95 public:
96
97 // attribute names
98
99 inline static const std::string s_application_name = "application_name";
100 inline static const std::string s_tx_generation_disabled = "tx_generation_disabled";
101
102 static const std::string& __get_application_name_str() noexcept { return s_application_name; }
103 static const std::string& __get_tx_generation_disabled_str() noexcept { return s_tx_generation_disabled; }
104
105
112 const std::string&
114 {
115 std::lock_guard scoped_lock(m_mutex);
116 check();
117 check_init();
118 return m_application_name;
119 }
120
127 void
128 set_application_name(const std::string& value)
129 {
130 std::lock_guard scoped_lock(m_mutex);
131 check();
132 clear();
134 }
135
136
144 bool
146 {
147 std::lock_guard scoped_lock(m_mutex);
148 check();
149 check_init();
151 }
152
160 void
162 {
163 std::lock_guard scoped_lock(m_mutex);
164 check();
165 clear();
167 }
168
169
170 // relationship names
171
172 inline static const std::string s_data_subscriber = "data_subscriber";
173 inline static const std::string s_trigger_inputs_handler = "trigger_inputs_handler";
174
175 static const std::string& __get_data_subscriber_str() noexcept { return s_data_subscriber; }
176 static const std::string& __get_trigger_inputs_handler_str() noexcept { return s_trigger_inputs_handler; }
177
178
187 {
188 std::lock_guard scoped_lock(m_mutex);
189 check();
190 check_init();
192 {
193 std::ostringstream text;
194 text << "relationship \"" << s_data_subscriber << "\" of object " << this << " is not set";
195 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
196 }
197 return m_data_subscriber;
198 }
199
200
207 void
209
218 {
219 std::lock_guard scoped_lock(m_mutex);
220 check();
221 check_init();
223 {
224 std::ostringstream text;
225 text << "relationship \"" << s_trigger_inputs_handler << "\" of object " << this << " is not set";
226 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
227 }
229 }
230
231
238 void
240
241
242 public:
243
244 // user-defined algorithms
245
250 std::vector<const dunedaq::confmodel::DaqModule*> generate_modules(const confmodel::Session*) const override;
251 };
252
253 // out stream operator
254
255 inline std::ostream& operator<<(std::ostream& s, const TriggerApplication& obj)
256 {
257 return obj.print_object(s);
258 }
259
260 typedef std::vector<const TriggerApplication*>::const_iterator TriggerApplicationIterator;
261
262 }
263}
264
265#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.
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...
std::vector< const dunedaq::confmodel::DaqModule * > generate_modules(const confmodel::Session *) const override
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.