DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
DFHWConf.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _DFHWConf_0_dunedaq__appmodel_0_appmodel_H_
4#define _DFHWConf_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
17 // forward declaration for classes used in relationships and algorithms
18
19namespace dunedaq {
20 namespace confmodel {
21 class StorageDevice;
22 }
23}
24
25
26namespace dunedaq {
27 namespace appmodel {
28
29 class DFHWConf : public virtual dunedaq::conffwk::DalObject {
30
31 friend class conffwk::Configuration;
32 friend class conffwk::DalObject;
33 friend class conffwk::DalFactory;
34 friend class conffwk::DalRegistry;
35
36 protected:
37
39 virtual ~DFHWConf() noexcept;
40 virtual void init(bool init_children);
41
42 public:
43
46 static const std::string& s_class_name;
47
48
58 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
59
60
70 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
71
72
73 protected:
74
75 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
76
77
78 private:
79
80 std::vector<const dunedaq::confmodel::StorageDevice*> m_uses;
81
82
83 public:
84
85 // relationship names
86
87 inline static const std::string s_uses = "uses";
88
89 static const std::string& __get_uses_str() noexcept { return s_uses; }
90
91
98 const std::vector<const dunedaq::confmodel::StorageDevice*>&
99 get_uses() const
100 {
101 std::lock_guard scoped_lock(m_mutex);
102 check();
103 check_init();
104 if (m_uses.empty())
105 {
106 std::ostringstream text;
107 text << "relationship \"" << s_uses << "\" of object " << this << " is empty";
108 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
109 }
110 return m_uses;
111 }
112
113
120 void
121 set_uses(const std::vector<const dunedaq::confmodel::StorageDevice*>& value);
122
123 };
124
125 // out stream operator
126
127 inline std::ostream& operator<<(std::ostream& s, const DFHWConf& obj)
128 {
129 return obj.print_object(s);
130 }
131
132 typedef std::vector<const DFHWConf*>::const_iterator DFHWConfIterator;
133
134 }
135}
136
137#endif
#define ERS_HERE
virtual ~DFHWConf() noexcept
static const std::string & __get_uses_str() noexcept
Definition DFHWConf.hpp:89
virtual void init(bool init_children)
Definition DFHWConf.cpp:59
static const std::string & s_class_name
Definition DFHWConf.hpp:46
friend class conffwk::DalFactory
Definition DFHWConf.hpp:33
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 DFHWConf.cpp:77
static const std::string s_uses
Definition DFHWConf.hpp:87
friend class conffwk::DalObject
Definition DFHWConf.hpp:32
const std::vector< const dunedaq::confmodel::StorageDevice * > & get_uses() const
Get "uses" relationship value.
Definition DFHWConf.hpp:99
std::vector< const dunedaq::confmodel::StorageDevice * > m_uses
Definition DFHWConf.hpp:80
void set_uses(const std::vector< const dunedaq::confmodel::StorageDevice * > &value)
Set "uses" relationship value.
DFHWConf(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
The base class for any generated DAL object.
Definition DalObject.hpp:45
std::mutex m_mutex
Used to protect changes of DAL 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.
conffwk entry point
double offset
std::ostream & operator<<(std::ostream &s, const AVXAbsRunSumProcessor &obj)
std::vector< constDFHWConf * >::const_iterator DFHWConfIterator
Definition DFHWConf.hpp:132
Including Qt Headers.