DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
CTBPulser.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _CTBPulser_0_dunedaq__appmodel_0_appmodel_H_
4#define _CTBPulser_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 ~CTBPulser() 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 bool m_enable;
79 uint64_t m_frequency;
80
81
82 public:
83
84 // attribute names
85
86 inline static const std::string s_enable = "enable";
87 inline static const std::string s_frequency = "frequency";
88
89 static const std::string& __get_enable_str() noexcept { return s_enable; }
90 static const std::string& __get_frequency_str() noexcept { return s_frequency; }
91
92
99 bool
101 {
102 std::lock_guard scoped_lock(m_mutex);
103 check();
104 check_init();
105 return m_enable;
106 }
107
114 void
115 set_enable(bool value)
116 {
117 std::lock_guard scoped_lock(m_mutex);
118 check();
119 clear();
120 p_obj.set_by_val(s_enable, value);
121 }
122
123
130 uint64_t
132 {
133 std::lock_guard scoped_lock(m_mutex);
134 check();
135 check_init();
136 return m_frequency;
137 }
138
145 void
146 set_frequency(uint64_t value)
147 {
148 std::lock_guard scoped_lock(m_mutex);
149 check();
150 clear();
152 }
153
154
155 };
156
157 // out stream operator
158
159 inline std::ostream& operator<<(std::ostream& s, const CTBPulser& obj)
160 {
161 return obj.print_object(s);
162 }
163
164 typedef std::vector<const CTBPulser*>::const_iterator CTBPulserIterator;
165
166 }
167}
168
169#endif
static const std::string s_frequency
Definition CTBPulser.hpp:87
virtual void init(bool init_children)
Definition CTBPulser.cpp:62
static const std::string & __get_enable_str() noexcept
Definition CTBPulser.hpp:89
static const std::string & s_class_name
Definition CTBPulser.hpp:44
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 CTBPulser.cpp:81
void set_frequency(uint64_t value)
Set "frequency" attribute value.
bool get_enable() const
Get "enable" attribute value.
virtual ~CTBPulser() noexcept
friend class conffwk::DalFactory
Definition CTBPulser.hpp:31
void set_enable(bool value)
Set "enable" attribute value.
static const std::string & __get_frequency_str() noexcept
Definition CTBPulser.hpp:90
friend class conffwk::DalObject
Definition CTBPulser.hpp:30
uint64_t get_frequency() const
Get "frequency" attribute value.
static const std::string s_enable
Definition CTBPulser.hpp:86
CTBPulser(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
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< constCTBPulser * >::const_iterator CTBPulserIterator
Including Qt Headers.