DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
build
confmodel
codegen
include
confmodel
FSMsequence.hpp
Go to the documentation of this file.
1
// *** this file is generated by oksdalgen, do not modify it ***
2
3
#ifndef _FSMsequence_0_dunedaq__confmodel_0_confmodel_H_
4
#define _FSMsequence_0_dunedaq__confmodel_0_confmodel_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
17
// forward declaration for classes used in relationships and algorithms
18
19
namespace
dunedaq
{
20
namespace
confmodel
{
21
class
FSMCommand
;
22
}
23
}
24
25
26
namespace
dunedaq
{
27
namespace
confmodel
{
28
29
class
FSMsequence
:
public
virtual
dunedaq::conffwk::DalObject
{
30
31
friend
class
conffwk::Configuration
;
32
friend
class
conffwk::DalObject
;
33
friend
class
conffwk::DalFactory
;
34
friend
class
conffwk::DalRegistry
;
35
36
protected
:
37
38
FSMsequence
(
conffwk::DalRegistry
& db,
const
conffwk::ConfigObject
&
obj
)
noexcept
;
39
virtual
~FSMsequence
() noexcept;
40
virtual
void
init
(
bool
init_children);
41
42
public:
43
45
46
static const
std
::
string
&
s_class_name
;
47
48
57
58
virtual
void
print
(
unsigned
int
offset
,
bool
print_header,
std
::ostream& s) const;
59
60
69
70
virtual
std
::vector<const
dunedaq
::
conffwk
::
DalObject
*>
get
(const
std
::
string
& name,
bool
upcast_unregistered = true) const;
71
72
73
protected:
74
75
bool
get
(const
std
::
string
& name,
std
::vector<const
dunedaq
::
conffwk
::
DalObject
*>& vec,
bool
upcast_unregistered,
bool
first_call) const;
76
77
78
private:
79
80
std
::vector<
std
::
string
>
m_name
;
81
std
::vector<const
dunedaq
::
confmodel
::
FSMCommand
*>
m_sequence
;
82
83
84
public:
85
86
// attribute names
87
88
inline static const
std
::
string
s_name
=
"name"
;
89
90
static const
std
::
string
&
__get_name_str
() noexcept {
return
s_name
; }
91
92
98
99
const
std::vector<std::string>&
100
get_name
()
const
101
{
102
std::lock_guard scoped_lock(
m_mutex
);
103
check
();
104
check_init
();
105
return
m_name
;
106
}
107
113
114
void
115
set_name
(
const
std::vector<std::string>& value)
116
{
117
std::lock_guard scoped_lock(
m_mutex
);
118
check
();
119
clear
();
120
p_obj
.set_by_val(
s_name
, value);
121
}
122
123
124
// relationship names
125
126
inline
static
const
std::string
s_sequence
=
"sequence"
;
127
128
static
const
std::string&
__get_sequence_str
() noexcept {
return
s_sequence
; }
129
130
136
137
const
std::vector<const dunedaq::confmodel::FSMCommand*>&
138
get_sequence
()
const
139
{
140
std::lock_guard scoped_lock(
m_mutex
);
141
check
();
142
check_init
();
143
if
(
m_sequence
.empty())
144
{
145
std::ostringstream text;
146
text <<
"relationship \""
<<
s_sequence
<<
"\" of object "
<<
this
<<
" is empty"
;
147
throw
dunedaq::conffwk::Generic(
ERS_HERE
, text.str().c_str());
148
}
149
return
m_sequence
;
150
}
151
152
158
159
void
160
set_sequence
(
const
std::vector<const dunedaq::confmodel::FSMCommand*>& value);
161
162
};
163
164
// out stream operator
165
166
inline
std::ostream&
operator<<
(std::ostream& s,
const
FSMsequence
&
obj
)
167
{
168
return
obj
.print_object(s);
169
}
170
171
typedef
std::vector<const FSMsequence*>::const_iterator
FSMsequenceIterator
;
172
173
}
174
}
175
176
#endif
DalObject.hpp
ERS_HERE
#define ERS_HERE
Definition
LocalContext.hpp:141
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::FSMCommand
Definition
FSMCommand.hpp:20
dunedaq::confmodel::FSMsequence
Definition
FSMsequence.hpp:29
dunedaq::confmodel::FSMsequence::set_sequence
void set_sequence(const std::vector< const dunedaq::confmodel::FSMCommand * > &value)
Set "sequence" relationship value.
Definition
FSMsequence.cpp:112
dunedaq::confmodel::FSMsequence::__get_name_str
static const std::string & __get_name_str() noexcept
Definition
FSMsequence.hpp:90
dunedaq::confmodel::FSMsequence::m_name
std::vector< std::string > m_name
Definition
FSMsequence.hpp:80
dunedaq::confmodel::FSMsequence::init
virtual void init(bool init_children)
Definition
FSMsequence.cpp:64
dunedaq::confmodel::FSMsequence::s_class_name
static const std::string & s_class_name
Definition
FSMsequence.hpp:46
dunedaq::confmodel::FSMsequence::get_name
const std::vector< std::string > & get_name() const
Get "name" attribute value.
Definition
FSMsequence.hpp:100
dunedaq::confmodel::FSMsequence::s_name
static const std::string s_name
Definition
FSMsequence.hpp:88
dunedaq::confmodel::FSMsequence::set_name
void set_name(const std::vector< std::string > &value)
Set "name" attribute value.
Definition
FSMsequence.hpp:115
dunedaq::confmodel::FSMsequence::DalFactory
friend class conffwk::DalFactory
Definition
FSMsequence.hpp:33
dunedaq::confmodel::FSMsequence::s_sequence
static const std::string s_sequence
Definition
FSMsequence.hpp:126
dunedaq::confmodel::FSMsequence::m_sequence
std::vector< const dunedaq::confmodel::FSMCommand * > m_sequence
Definition
FSMsequence.hpp:81
dunedaq::confmodel::FSMsequence::print
virtual void print(unsigned int offset, bool print_header, std::ostream &s) const
Print details of the FSMsequence object.
Definition
FSMsequence.cpp:38
dunedaq::confmodel::FSMsequence::DalObject
friend class conffwk::DalObject
Definition
FSMsequence.hpp:32
dunedaq::confmodel::FSMsequence::~FSMsequence
virtual ~FSMsequence() noexcept
Definition
FSMsequence.cpp:79
dunedaq::confmodel::FSMsequence::FSMsequence
FSMsequence(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
Definition
FSMsequence.cpp:31
dunedaq::confmodel::FSMsequence::get_sequence
const std::vector< const dunedaq::confmodel::FSMCommand * > & get_sequence() const
Get "sequence" relationship value.
Definition
FSMsequence.hpp:138
dunedaq::confmodel::FSMsequence::__get_sequence_str
static const std::string & __get_sequence_str() noexcept
Definition
FSMsequence.hpp:128
dunedaq::confmodel::FSMsequence::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
FSMsequence.cpp:83
Configuration.hpp
conffwk entry point
offset
double offset
Definition
conversions-impl.hh:28
conffwk.ConfigObject
Definition
ConfigObject.py:1
conffwk.Configuration
Definition
Configuration.py:1
conffwk
Definition
__init__.py:1
dunedaq::confmodel
Definition
DisabledResources.hpp:10
dunedaq::confmodel::FSMsequenceIterator
std::vector< constFSMsequence * >::const_iterator FSMsequenceIterator
Definition
FSMsequence.hpp:171
dunedaq::confmodel::operator<<
std::ostream & operator<<(std::ostream &s, const ActionPlan &obj)
Definition
ActionPlan.hpp:210
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