DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
build
appmodel
codegen
include
appmodel
DataWriterModule.hpp
Go to the documentation of this file.
1
// *** this file is generated by oksdalgen, do not modify it ***
2
3
#ifndef _DataWriterModule_0_dunedaq__appmodel_0_appmodel_H_
4
#define _DataWriterModule_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
13
#include "
conffwk/Configuration.hpp
"
14
#include "
conffwk/DalObject.hpp
"
15
16
// include files for classes used in inheritance hierarchy
17
18
#include "
confmodel/DaqModule.hpp
"
19
20
// forward declaration for classes used in relationships and algorithms
21
22
namespace
dunedaq
{
23
namespace
appmodel
{
24
class
DataWriterConf
;
25
}
26
}
27
28
29
namespace
dunedaq
{
30
namespace
appmodel
{
31
32
class
DataWriterModule
:
public
dunedaq::confmodel::DaqModule
{
33
34
friend
class
conffwk::Configuration
;
35
friend
class
conffwk::DalObject
;
36
friend
class
conffwk::DalFactory
;
37
friend
class
conffwk::DalRegistry
;
38
39
protected
:
40
41
DataWriterModule
(
conffwk::DalRegistry
& db,
const
conffwk::ConfigObject
&
obj
)
noexcept
;
42
virtual
~DataWriterModule
() noexcept;
43
virtual
void
init
(
bool
init_children);
44
45
public:
46
48
49
static const
std
::
string
&
s_class_name
;
50
51
60
61
virtual
void
print
(
unsigned
int
offset
,
bool
print_header,
std
::ostream& s) const;
62
63
72
73
virtual
std
::vector<const
dunedaq
::
conffwk
::
DalObject
*>
get
(const
std
::
string
& name,
bool
upcast_unregistered = true) const;
74
75
76
protected:
77
78
bool
get
(const
std
::
string
& name,
std
::vector<const
dunedaq
::
conffwk
::
DalObject
*>& vec,
bool
upcast_unregistered,
bool
first_call) const;
79
80
81
private:
82
83
std
::
string
m_writer_identifier
;
84
const
dunedaq
::
appmodel
::
DataWriterConf
*
m_configuration
;
85
86
87
public:
88
89
// attribute names
90
91
inline static const
std
::
string
s_writer_identifier
=
"writer_identifier"
;
92
93
static const
std
::
string
&
__get_writer_identifier_str
() noexcept {
return
s_writer_identifier
; }
94
95
101
102
const
std::string&
103
get_writer_identifier
()
const
104
{
105
std::lock_guard scoped_lock(
m_mutex
);
106
check
();
107
check_init
();
108
return
m_writer_identifier
;
109
}
110
116
117
void
118
set_writer_identifier
(
const
std::string& value)
119
{
120
std::lock_guard scoped_lock(
m_mutex
);
121
check
();
122
clear
();
123
p_obj
.set_by_ref(
s_writer_identifier
, value);
124
}
125
126
127
// relationship names
128
129
inline
static
const
std::string
s_configuration
=
"configuration"
;
130
131
static
const
std::string&
__get_configuration_str
() noexcept {
return
s_configuration
; }
132
133
139
140
const
dunedaq::appmodel::DataWriterConf
*
141
get_configuration
()
const
142
{
143
std::lock_guard scoped_lock(
m_mutex
);
144
check
();
145
check_init
();
146
if
(!
m_configuration
)
147
{
148
std::ostringstream text;
149
text <<
"relationship \""
<<
s_configuration
<<
"\" of object "
<<
this
<<
" is not set"
;
150
throw
dunedaq::conffwk::Generic(
ERS_HERE
, text.str().c_str());
151
}
152
return
m_configuration
;
153
}
154
155
161
162
void
163
set_configuration
(
const
dunedaq::appmodel::DataWriterConf
* value);
164
165
};
166
167
// out stream operator
168
169
inline
std::ostream&
operator<<
(std::ostream& s,
const
DataWriterModule
&
obj
)
170
{
171
return
obj
.print_object(s);
172
}
173
174
typedef
std::vector<const DataWriterModule*>::const_iterator
DataWriterModuleIterator
;
175
176
}
177
}
178
179
#endif
DalObject.hpp
ERS_HERE
#define ERS_HERE
Definition
LocalContext.hpp:141
dunedaq::appmodel::DataWriterConf
Definition
DataWriterConf.hpp:29
dunedaq::appmodel::DataWriterModule
Definition
DataWriterModule.hpp:32
dunedaq::appmodel::DataWriterModule::m_writer_identifier
std::string m_writer_identifier
Definition
DataWriterModule.hpp:83
dunedaq::appmodel::DataWriterModule::DataWriterModule
DataWriterModule(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
Definition
DataWriterModule.cpp:31
dunedaq::appmodel::DataWriterModule::print
virtual void print(unsigned int offset, bool print_header, std::ostream &s) const
Print details of the DataWriterModule object.
Definition
DataWriterModule.cpp:41
dunedaq::appmodel::DataWriterModule::set_writer_identifier
void set_writer_identifier(const std::string &value)
Set "writer_identifier" attribute value.
Definition
DataWriterModule.hpp:118
dunedaq::appmodel::DataWriterModule::get_configuration
const dunedaq::appmodel::DataWriterConf * get_configuration() const
Get "configuration" relationship value.
Definition
DataWriterModule.hpp:141
dunedaq::appmodel::DataWriterModule::s_class_name
static const std::string & s_class_name
Definition
DataWriterModule.hpp:49
dunedaq::appmodel::DataWriterModule::get_writer_identifier
const std::string & get_writer_identifier() const
Get "writer_identifier" attribute value.
Definition
DataWriterModule.hpp:103
dunedaq::appmodel::DataWriterModule::__get_configuration_str
static const std::string & __get_configuration_str() noexcept
Definition
DataWriterModule.hpp:131
dunedaq::appmodel::DataWriterModule::DalFactory
friend class conffwk::DalFactory
Definition
DataWriterModule.hpp:36
dunedaq::appmodel::DataWriterModule::s_writer_identifier
static const std::string s_writer_identifier
Definition
DataWriterModule.hpp:91
dunedaq::appmodel::DataWriterModule::set_configuration
void set_configuration(const dunedaq::appmodel::DataWriterConf *value)
Set "configuration" relationship value.
Definition
DataWriterModule.cpp:122
dunedaq::appmodel::DataWriterModule::DalObject
friend class conffwk::DalObject
Definition
DataWriterModule.hpp:35
dunedaq::appmodel::DataWriterModule::m_configuration
const dunedaq::appmodel::DataWriterConf * m_configuration
Definition
DataWriterModule.hpp:84
dunedaq::appmodel::DataWriterModule::init
virtual void init(bool init_children)
Definition
DataWriterModule.cpp:72
dunedaq::appmodel::DataWriterModule::get
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
DataWriterModule.cpp:91
dunedaq::appmodel::DataWriterModule::~DataWriterModule
virtual ~DataWriterModule() noexcept
Definition
DataWriterModule.cpp:87
dunedaq::appmodel::DataWriterModule::s_configuration
static const std::string s_configuration
Definition
DataWriterModule.hpp:129
dunedaq::appmodel::DataWriterModule::__get_writer_identifier_str
static const std::string & __get_writer_identifier_str() noexcept
Definition
DataWriterModule.hpp:93
dunedaq::conffwk::DalObject
The base class for any generated DAL object.
Definition
DalObject.hpp:52
dunedaq::conffwk::DalObject::clear
void clear() noexcept
Definition
DalObject.hpp:83
dunedaq::conffwk::DalObject::m_mutex
std::mutex m_mutex
Used to protect changes of DAL object.
Definition
DalObject.hpp:115
dunedaq::conffwk::DalObject::check
void check() const
Definition
DalObject.hpp:94
dunedaq::conffwk::DalObject::p_obj
ConfigObject p_obj
Config object used by given template object.
Definition
DalObject.hpp:124
dunedaq::conffwk::DalObject::check_init
void check_init() const
Check and initialize object if necessary.
Definition
DalObject.hpp:412
dunedaq::conffwk::DalRegistry
DalRegistry: A registry of DalObjects It provides a single interface to create, cache and manage DalO...
Definition
DalRegistry.hpp:19
dunedaq::confmodel::DaqModule
Definition
DaqModule.hpp:34
Configuration.hpp
conffwk entry point
offset
double offset
Definition
conversions-impl.hh:28
DaqModule.hpp
conffwk.ConfigObject
Definition
ConfigObject.py:1
conffwk.Configuration
Definition
Configuration.py:1
conffwk
Definition
__init__.py:1
dunedaq::appmodel
Definition
CardControllerWrapper.hpp:21
dunedaq::appmodel::operator<<
std::ostream & operator<<(std::ostream &s, const AVXAbsRunSumProcessor &obj)
Definition
AVXAbsRunSumProcessor.hpp:80
dunedaq::appmodel::DataWriterModuleIterator
std::vector< constDataWriterModule * >::const_iterator DataWriterModuleIterator
Definition
DataWriterModule.hpp:174
dunedaq
Including Qt Headers.
Definition
module.cpp:16
dunedaq::obj
msgpack::object obj
Definition
Serialization.hpp:257
std
Definition
SchemaUtils.hpp:118
Generated on
for DUNE-DAQ by
1.17.0