DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
DetectorStream.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _DetectorStream_0_dunedaq__confmodel_0_confmodel_H_
4#define _DetectorStream_0_dunedaq__confmodel_0_confmodel_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
20 // forward declaration for classes used in relationships and algorithms
21
22namespace dunedaq {
23 namespace confmodel {
24 class GeoId;
25 }
26}
27
28
29namespace dunedaq {
30 namespace confmodel {
31
32 class DetectorStream : public dunedaq::confmodel::Resource {
33
35 friend class conffwk::DalObject;
36 friend class conffwk::DalFactory;
38
39 protected:
40
42 virtual ~DetectorStream() noexcept;
43 virtual void init(bool init_children);
44
45 public:
46
49 static const std::string& s_class_name;
50
51
61 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
62
63
73 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
74
75
76 protected:
77
78 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
79
80
81 private:
82
83 uint32_t m_source_id;
85
86
87 public:
88
89 // attribute names
90
91 inline static const std::string s_source_id = "source_id";
92
93 static const std::string& __get_source_id_str() noexcept { return s_source_id; }
94
95
102 uint32_t
104 {
105 std::lock_guard scoped_lock(m_mutex);
106 check();
107 check_init();
108 return m_source_id;
109 }
110
117 void
118 set_source_id(uint32_t value)
119 {
120 std::lock_guard scoped_lock(m_mutex);
121 check();
122 clear();
124 }
125
126
127 // relationship names
128
129 inline static const std::string s_geo_id = "geo_id";
130
131 static const std::string& __get_geo_id_str() noexcept { return s_geo_id; }
132
133
142 {
143 std::lock_guard scoped_lock(m_mutex);
144 check();
145 check_init();
146 if (!m_geo_id)
147 {
148 std::ostringstream text;
149 text << "relationship \"" << s_geo_id << "\" of object " << this << " is not set";
150 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
151 }
152 return m_geo_id;
153 }
154
155
162 void
164
165 };
166
167 // out stream operator
168
169 inline std::ostream& operator<<(std::ostream& s, const DetectorStream& obj)
170 {
171 return obj.print_object(s);
172 }
173
174 typedef std::vector<const DetectorStream*>::const_iterator DetectorStreamIterator;
175
176 }
177}
178
179#endif
#define ERS_HERE
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...
Generic configuration exception.
const dunedaq::confmodel::GeoId * get_geo_id() const
Get "geo_id" relationship value.
uint32_t get_source_id() const
Get "source_id" attribute value.
DetectorStream(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
const dunedaq::confmodel::GeoId * m_geo_id
void set_geo_id(const dunedaq::confmodel::GeoId *value)
Set "geo_id" relationship value.
static const std::string & s_class_name
static const std::string & __get_source_id_str() 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 s_source_id
static const std::string s_geo_id
static const std::string & __get_geo_id_str() noexcept
void set_source_id(uint32_t value)
Set "source_id" attribute value.
virtual void init(bool init_children)
conffwk entry point
double offset
std::vector< constDetectorStream * >::const_iterator DetectorStreamIterator
std::ostream & operator<<(std::ostream &s, const ActionPlan &obj)
Including Qt Headers.