DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
TimingFanoutDevice.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _TimingFanoutDevice_0_dunedaq__timinglibs__dal_0_timinglibs_dal_H_
4#define _TimingFanoutDevice_0_dunedaq__timinglibs__dal_0_timinglibs_dal_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 timinglibs {
22 namespace dal {
23
29
30 friend class conffwk::Configuration;
31 friend class conffwk::DalObject;
32 friend class conffwk::DalFactory;
33 friend class conffwk::DalRegistry;
34
35 protected:
36
38 virtual ~TimingFanoutDevice() noexcept;
39 virtual void init(bool init_children);
40
41 public:
42
45 static const std::string& s_class_name;
46
47
57 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
58
59
69 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
70
71
72 protected:
73
74 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
75
76
77 private:
78
79 uint32_t m_fanout_slot;
80 std::string m_device;
81
82
83 public:
84
85 // attribute names
86
87 inline static const std::string s_fanout_slot = "fanout_slot";
88 inline static const std::string s_device = "device";
89
90 static const std::string& __get_fanout_slot_str() noexcept { return s_fanout_slot; }
91 static const std::string& __get_device_str() noexcept { return s_device; }
92
93
101 uint32_t
103 {
104 std::lock_guard scoped_lock(m_mutex);
105 check();
106 check_init();
107 return m_fanout_slot;
108 }
109
117 void
118 set_fanout_slot(uint32_t value)
119 {
120 std::lock_guard scoped_lock(m_mutex);
121 check();
122 clear();
124 }
125
126
134 const std::string&
136 {
137 std::lock_guard scoped_lock(m_mutex);
138 check();
139 check_init();
140 return m_device;
141 }
142
150 void
151 set_device(const std::string& value)
152 {
153 std::lock_guard scoped_lock(m_mutex);
154 check();
155 clear();
156 p_obj.set_by_ref(s_device, value);
157 }
158
159
160 };
161
162 // out stream operator
163
164 inline std::ostream& operator<<(std::ostream& s, const TimingFanoutDevice& obj)
165 {
166 return obj.print_object(s);
167 }
168
169 typedef std::vector<const TimingFanoutDevice*>::const_iterator TimingFanoutDeviceIterator;
170
171 }
172 }
173}
174
175#endif
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...
void set_device(const std::string &value)
Set "device" attribute value. Device name of the fanout.
static const std::string & __get_fanout_slot_str() noexcept
void set_fanout_slot(uint32_t value)
Set "fanout_slot" attribute value. Fanout slot of the device.
TimingFanoutDevice(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
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 & __get_device_str() noexcept
uint32_t get_fanout_slot() const
Get "fanout_slot" attribute value. Fanout slot of the device.
const std::string & get_device() const
Get "device" attribute value. Device name of the fanout.
conffwk entry point
double offset
std::vector< constTimingFanoutDevice * >::const_iterator TimingFanoutDeviceIterator
std::ostream & operator<<(std::ostream &s, const EndpointLocation &obj)
Including Qt Headers.