DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
build
appmodel
codegen
src
TAAlgorithm.hpp
Go to the documentation of this file.
1
// *** this file is generated by oksdalgen, do not modify it ***
2
3
#ifndef _TAAlgorithm_0_dunedaq__appmodel_0_appmodel_H_
4
#define _TAAlgorithm_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/Jsonable.hpp
"
19
20
namespace
dunedaq
{
21
namespace
appmodel
{
22
26
27
class
TAAlgorithm
:
public
dunedaq::confmodel::Jsonable {
28
29
friend
class
conffwk::Configuration
;
30
friend
class
conffwk::DalObject
;
31
friend
class
conffwk::DalFactory
;
32
friend
class
conffwk::DalRegistry
;
33
34
protected
:
35
36
TAAlgorithm
(
conffwk::DalRegistry
& db,
const
conffwk::ConfigObject
&
obj
)
noexcept
;
37
virtual
~TAAlgorithm
() noexcept;
38
virtual
void
init
(
bool
init_children);
39
40
public:
41
43
44
static const
std
::
string
&
s_class_name
;
45
46
55
56
virtual
void
print
(
unsigned
int
offset
,
bool
print_header,
std
::ostream& s) const;
57
58
67
68
virtual
std
::vector<const
dunedaq
::
conffwk
::
DalObject
*>
get
(const
std
::
string
& name,
bool
upcast_unregistered = true) const;
69
70
71
protected:
72
73
bool
get
(const
std
::
string
& name,
std
::vector<const
dunedaq
::
conffwk
::
DalObject
*>& vec,
bool
upcast_unregistered,
bool
first_call) const;
74
75
76
private:
77
78
uint32_t
m_prescale
;
79
uint32_t
m_max_samples_over_threshold
;
80
81
82
public:
83
84
// attribute names
85
86
inline static const
std
::
string
s_prescale
=
"prescale"
;
87
inline static const
std
::
string
s_max_samples_over_threshold
=
"max_samples_over_threshold"
;
88
89
static const
std
::
string
&
__get_prescale_str
() noexcept {
return
s_prescale
; }
90
static
const
std::string&
__get_max_samples_over_threshold_str
() noexcept {
return
s_max_samples_over_threshold
; }
91
92
99
100
uint32_t
101
get_prescale
()
const
102
{
103
std::lock_guard scoped_lock(
m_mutex
);
104
check
();
105
check_init
();
106
return
m_prescale
;
107
}
108
115
116
void
117
set_prescale
(uint32_t value)
118
{
119
std::lock_guard scoped_lock(
m_mutex
);
120
check
();
121
clear
();
122
p_obj
.set_by_val(
s_prescale
, value);
123
}
124
125
132
133
uint32_t
134
get_max_samples_over_threshold
()
const
135
{
136
std::lock_guard scoped_lock(
m_mutex
);
137
check
();
138
check_init
();
139
return
m_max_samples_over_threshold
;
140
}
141
148
149
void
150
set_max_samples_over_threshold
(uint32_t value)
151
{
152
std::lock_guard scoped_lock(
m_mutex
);
153
check
();
154
clear
();
155
p_obj
.set_by_val(
s_max_samples_over_threshold
, value);
156
}
157
158
159
};
160
161
// out stream operator
162
163
inline
std::ostream&
operator<<
(std::ostream& s,
const
TAAlgorithm&
obj
)
164
{
165
return
obj
.print_object(s);
166
}
167
168
typedef
std::vector<const TAAlgorithm*>::const_iterator
TAAlgorithmIterator
;
169
170
}
171
}
172
173
#endif
DalObject.hpp
dunedaq::appmodel::TAAlgorithm
Definition
TAAlgorithm.hpp:27
dunedaq::appmodel::TAAlgorithm::DalRegistry
friend class conffwk::DalRegistry
Definition
TAAlgorithm.hpp:32
dunedaq::appmodel::TAAlgorithm::TAAlgorithm
TAAlgorithm(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
dunedaq::appmodel::TAAlgorithm::get_max_samples_over_threshold
uint32_t get_max_samples_over_threshold() const
Get "max_samples_over_threshold" attribute value. Maximum samples-over-threshold for TP to accept by ...
Definition
TAAlgorithm.hpp:134
dunedaq::appmodel::TAAlgorithm::get_prescale
uint32_t get_prescale() const
Get "prescale" attribute value. Prescale factor to apply to algorithm output.
Definition
TAAlgorithm.hpp:101
dunedaq::appmodel::TAAlgorithm::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
TAAlgorithm.cpp:81
dunedaq::appmodel::TAAlgorithm::s_prescale
static const std::string s_prescale
Definition
TAAlgorithm.hpp:86
dunedaq::appmodel::TAAlgorithm::~TAAlgorithm
virtual ~TAAlgorithm() noexcept
dunedaq::appmodel::TAAlgorithm::DalFactory
friend class conffwk::DalFactory
Definition
TAAlgorithm.hpp:31
dunedaq::appmodel::TAAlgorithm::set_max_samples_over_threshold
void set_max_samples_over_threshold(uint32_t value)
Set "max_samples_over_threshold" attribute value. Maximum samples-over-threshold for TP to accept by ...
Definition
TAAlgorithm.hpp:150
dunedaq::appmodel::TAAlgorithm::init
virtual void init(bool init_children)
Definition
TAAlgorithm.cpp:62
dunedaq::appmodel::TAAlgorithm::__get_max_samples_over_threshold_str
static const std::string & __get_max_samples_over_threshold_str() noexcept
Definition
TAAlgorithm.hpp:90
dunedaq::appmodel::TAAlgorithm::__get_prescale_str
static const std::string & __get_prescale_str() noexcept
Definition
TAAlgorithm.hpp:89
dunedaq::appmodel::TAAlgorithm::m_max_samples_over_threshold
uint32_t m_max_samples_over_threshold
Definition
TAAlgorithm.hpp:79
dunedaq::appmodel::TAAlgorithm::DalObject
friend class conffwk::DalObject
Definition
TAAlgorithm.hpp:30
dunedaq::appmodel::TAAlgorithm::s_max_samples_over_threshold
static const std::string s_max_samples_over_threshold
Definition
TAAlgorithm.hpp:87
dunedaq::appmodel::TAAlgorithm::set_prescale
void set_prescale(uint32_t value)
Set "prescale" attribute value. Prescale factor to apply to algorithm output.
Definition
TAAlgorithm.hpp:117
dunedaq::appmodel::TAAlgorithm::Configuration
friend class conffwk::Configuration
Definition
TAAlgorithm.hpp:29
dunedaq::appmodel::TAAlgorithm::print
virtual void print(unsigned int offset, bool print_header, std::ostream &s) const
Print details of the TAAlgorithm object.
Definition
TAAlgorithm.cpp:35
dunedaq::appmodel::TAAlgorithm::s_class_name
static const std::string & s_class_name
Definition
TAAlgorithm.hpp:44
dunedaq::appmodel::TAAlgorithm::m_prescale
uint32_t m_prescale
Definition
TAAlgorithm.hpp:78
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
Configuration.hpp
conffwk entry point
offset
double offset
Definition
conversions-impl.hh:28
Jsonable.hpp
conffwk.ConfigObject
Definition
ConfigObject.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::TAAlgorithmIterator
std::vector< constTAAlgorithm * >::const_iterator TAAlgorithmIterator
Definition
TAAlgorithm.hpp:168
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