DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
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
14#include "conffwk/DalObject.hpp"
15
16 // include files for classes used in inheritance hierarchy
17
19
20namespace dunedaq {
21 namespace appmodel {
22
27 class TAAlgorithm : public dunedaq::confmodel::Jsonable {
28
30 friend class conffwk::DalObject;
31 friend class conffwk::DalFactory;
33
34 protected:
35
37 virtual ~TAAlgorithm() noexcept;
38 virtual void init(bool init_children);
39
40 public:
41
44 static const std::string& s_class_name;
45
46
56 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
57
58
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;
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
100 uint32_t
102 {
103 std::lock_guard scoped_lock(m_mutex);
104 check();
105 check_init();
106 return m_prescale;
107 }
108
116 void
117 set_prescale(uint32_t value)
118 {
119 std::lock_guard scoped_lock(m_mutex);
120 check();
121 clear();
123 }
124
125
133 uint32_t
135 {
136 std::lock_guard scoped_lock(m_mutex);
137 check();
138 check_init();
140 }
141
149 void
151 {
152 std::lock_guard scoped_lock(m_mutex);
153 check();
154 clear();
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
TAAlgorithm(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
uint32_t get_max_samples_over_threshold() const
Get "max_samples_over_threshold" attribute value. Maximum samples-over-threshold for TP to accept by ...
uint32_t get_prescale() const
Get "prescale" attribute value. Prescale factor to apply to algorithm output.
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...
static const std::string s_prescale
friend class conffwk::DalFactory
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 ...
virtual void init(bool init_children)
static const std::string & __get_max_samples_over_threshold_str() noexcept
static const std::string & __get_prescale_str() noexcept
friend class conffwk::DalObject
virtual ~TAAlgorithm() noexcept
static const std::string s_max_samples_over_threshold
void set_prescale(uint32_t value)
Set "prescale" attribute value. Prescale factor to apply to algorithm output.
static const std::string & s_class_name
void set_by_val(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...
conffwk entry point
double offset
std::ostream & operator<<(std::ostream &s, const AVXAbsRunSumProcessor &obj)
std::vector< constTAAlgorithm * >::const_iterator TAAlgorithmIterator
Including Qt Headers.