DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
CTBModule.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _CTBModule_0_dunedaq__appmodel_0_appmodel_H_
4#define _CTBModule_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 CTBConf;
25 class CTBoardConf;
26 }
27}
28
29
30namespace dunedaq {
31 namespace appmodel {
32
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 ~CTBModule() 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
91
92
93 public:
94
95 // attribute names
96
97 inline static const std::string s_run_trigger_output = "run_trigger_output";
98
99 static const std::string& __get_run_trigger_output_str() noexcept { return s_run_trigger_output; }
100
101
109 const std::string&
111 {
112 std::lock_guard scoped_lock(m_mutex);
113 check();
114 check_init();
116 }
117
125 void
126 set_run_trigger_output(const std::string& value)
127 {
128 std::lock_guard scoped_lock(m_mutex);
129 check();
130 clear();
132 }
133
134
135 // relationship names
136
137 inline static const std::string s_configuration = "configuration";
138 inline static const std::string s_board = "board";
139
140 static const std::string& __get_configuration_str() noexcept { return s_configuration; }
141 static const std::string& __get_board_str() noexcept { return s_board; }
142
143
152 {
153 std::lock_guard scoped_lock(m_mutex);
154 check();
155 check_init();
156 if (!m_configuration)
157 {
158 std::ostringstream text;
159 text << "relationship \"" << s_configuration << "\" of object " << this << " is not set";
160 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
161 }
162 return m_configuration;
163 }
164
165
172 void
174
182 get_board() const
183 {
184 std::lock_guard scoped_lock(m_mutex);
185 check();
186 check_init();
187 if (!m_board)
188 {
189 std::ostringstream text;
190 text << "relationship \"" << s_board << "\" of object " << this << " is not set";
191 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
192 }
193 return m_board;
194 }
195
196
203 void
205
206 };
207
208 // out stream operator
209
210 inline std::ostream& operator<<(std::ostream& s, const CTBModule& obj)
211 {
212 return obj.print_object(s);
213 }
214
215 typedef std::vector<const CTBModule*>::const_iterator CTBModuleIterator;
216
217 }
218}
219
220#endif
#define ERS_HERE
void set_configuration(const dunedaq::appmodel::CTBConf *value)
Set "configuration" relationship value.
const dunedaq::appmodel::CTBConf * m_configuration
Definition CTBModule.hpp:89
const dunedaq::appmodel::CTBoardConf * get_board() const
Get "board" relationship value.
static const std::string s_board
void set_board(const dunedaq::appmodel::CTBoardConf *value)
Set "board" relationship value.
virtual ~CTBModule() noexcept
static const std::string & __get_configuration_str() noexcept
static const std::string & s_class_name
Definition CTBModule.hpp:54
CTBModule(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
friend class conffwk::DalFactory
Definition CTBModule.hpp:41
static const std::string & __get_run_trigger_output_str() noexcept
Definition CTBModule.hpp:99
void set_run_trigger_output(const std::string &value)
Set "run_trigger_output" attribute value. CTB Trigger Output Path.
static const std::string & __get_board_str() noexcept
const std::string & get_run_trigger_output() const
Get "run_trigger_output" attribute value. CTB Trigger Output Path.
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...
Definition CTBModule.cpp:95
friend class conffwk::DalObject
Definition CTBModule.hpp:40
const dunedaq::appmodel::CTBoardConf * m_board
Definition CTBModule.hpp:90
const dunedaq::appmodel::CTBConf * get_configuration() const
Get "configuration" relationship value.
static const std::string s_configuration
virtual void init(bool init_children)
Definition CTBModule.cpp:75
static const std::string s_run_trigger_output
Definition CTBModule.hpp:97
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::vector< constCTBModule * >::const_iterator CTBModuleIterator
std::ostream & operator<<(std::ostream &s, const AVXAbsRunSumProcessor &obj)
Including Qt Headers.