DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
TCAlgorithm.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _TCAlgorithm_0_dunedaq__appmodel_0_appmodel_H_
4#define _TCAlgorithm_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
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
37 virtual ~TCAlgorithm() 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;
79 std::string m_tc_type_name;
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_tc_type_name = "tc_type_name";
88
89 static const std::string& __get_prescale_str() noexcept { return s_prescale; }
90 static const std::string& __get_tc_type_name_str() noexcept { return s_tc_type_name; }
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 const std::string&
135 {
136 std::lock_guard scoped_lock(m_mutex);
137 check();
138 check_init();
139 return m_tc_type_name;
140 }
141
149 void
150 set_tc_type_name(const std::string& value)
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 TCAlgorithm& obj)
164 {
165 return obj.print_object(s);
166 }
167
168 typedef std::vector<const TCAlgorithm*>::const_iterator TCAlgorithmIterator;
169
170 }
171}
172
173#endif
virtual ~TCAlgorithm() noexcept
static const std::string s_tc_type_name
static const std::string s_prescale
friend class conffwk::DalFactory
static const std::string & s_class_name
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...
void set_tc_type_name(const std::string &value)
Set "tc_type_name" attribute value. The output TC type name this algorithm will output.
TCAlgorithm(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
virtual void init(bool init_children)
static const std::string & __get_tc_type_name_str() noexcept
friend class conffwk::DalObject
uint32_t get_prescale() const
Get "prescale" attribute value. Prescale factor to apply to algorithm output.
const std::string & get_tc_type_name() const
Get "tc_type_name" attribute value. The output TC type name this algorithm will output.
static const std::string & __get_prescale_str() noexcept
void set_prescale(uint32_t value)
Set "prescale" attribute value. Prescale factor to apply to algorithm output.
void set_by_val(const std::string &name, T value)
Set attribute value.
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...
conffwk entry point
double offset
std::vector< constTCAlgorithm * >::const_iterator TCAlgorithmIterator
std::ostream & operator<<(std::ostream &s, const AVXAbsRunSumProcessor &obj)
Including Qt Headers.