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 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 ~TriggerApplication() 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;
92
93
94 public:
95
96 // attribute names
97
98 inline static const std::string s_application_name = "application_name";
99 inline static const std::string s_tx_generation_disabled = "tx_generation_disabled";
100
101 static const std::string& __get_application_name_str() noexcept { return s_application_name; }
102 static const std::string& __get_tx_generation_disabled_str() noexcept { return s_tx_generation_disabled; }
103
104
111 const std::string&
113 {
114 std::lock_guard scoped_lock(m_mutex);
115 check();
116 check_init();
117 return m_application_name;
118 }
119
126 void
127 set_application_name(const std::string& value)
128 {
129 std::lock_guard scoped_lock(m_mutex);
130 check();
131 clear();
133 }
134
135
143 bool
145 {
146 std::lock_guard scoped_lock(m_mutex);
147 check();
148 check_init();
150 }
151
159 void
161 {
162 std::lock_guard scoped_lock(m_mutex);
163 check();
164 clear();
166 }
167
168
169 // relationship names
170
171 inline static const std::string s_data_subscriber = "data_subscriber";
172 inline static const std::string s_trigger_inputs_handler = "trigger_inputs_handler";
173
174 static const std::string& __get_data_subscriber_str() noexcept { return s_data_subscriber; }
175 static const std::string& __get_trigger_inputs_handler_str() noexcept { return s_trigger_inputs_handler; }
176
177
186 {
187 std::lock_guard scoped_lock(m_mutex);
188 check();
189 check_init();
191 {
192 std::ostringstream text;
193 text << "relationship \"" << s_data_subscriber << "\" of object " << this << " is not set";
194 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
195 }
196 return m_data_subscriber;
197 }
198
199
206 void
208
217 {
218 std::lock_guard scoped_lock(m_mutex);
219 check();
220 check_init();
222 {
223 std::ostringstream text;
224 text << "relationship \"" << s_trigger_inputs_handler << "\" of object " << this << " is not set";
225 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
226 }
228 }
229
230
237 void
239
240
241 public:
242
243 // user-defined algorithms
244
249 void generate_modules(const confmodel::Session*) const override;
250 };
251
252 // out stream operator
253
254 inline std::ostream& operator<<(std::ostream& s, const TriggerApplication& obj)
255 {
256 return obj.print_object(s);
257 }
258
259 typedef std::vector<const TriggerApplication*>::const_iterator TriggerApplicationIterator;
260
261 }
262}
263
264#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...
void 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
The DUNE-DAQ namespace.
msgpack::object obj