DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
OpMonURI.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _OpMonURI_0_dunedaq__confmodel_0_confmodel_H_
4#define _OpMonURI_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
17namespace dunedaq {
18 namespace confmodel {
19
20 class OpMonURI : public virtual dunedaq::conffwk::DalObject {
21
22 friend class conffwk::Configuration;
23 friend class conffwk::DalObject;
24 friend class conffwk::DalFactory;
25 friend class conffwk::DalRegistry;
26
27 protected:
28
30 virtual ~OpMonURI() noexcept;
31 virtual void init(bool init_children);
32
33 public:
34
37 static const std::string& s_class_name;
38
39
49 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
50
51
61 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
62
63
64 protected:
65
66 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
67
68
69 private:
70
71 std::string m_path;
72 std::string m_type;
73
74
75 public:
76
77 // attribute names
78
79 inline static const std::string s_path = "path";
80 inline static const std::string s_type = "type";
81
82 static const std::string& __get_path_str() noexcept { return s_path; }
83 static const std::string& __get_type_str() noexcept { return s_type; }
84
85
93 const std::string&
94 get_path() const
95 {
96 std::lock_guard scoped_lock(m_mutex);
97 check();
98 check_init();
99 return m_path;
100 }
101
109 void
110 set_path(const std::string& value)
111 {
112 std::lock_guard scoped_lock(m_mutex);
113 check();
114 clear();
115 p_obj.set_by_ref(s_path, value);
116 }
117
118
123 struct Type {
124 inline static const std::string Stdout = "stdout";
125 inline static const std::string File = "file";
126 inline static const std::string Stream = "stream";
127 };
128
136 const std::string&
137 get_type() const
138 {
139 std::lock_guard scoped_lock(m_mutex);
140 check();
141 check_init();
142 return m_type;
143 }
144
152 void
153 set_type(const std::string& value)
154 {
155 std::lock_guard scoped_lock(m_mutex);
156 check();
157 clear();
158 p_obj.set_enum(s_type, value);
159 }
160
161
162
163 public:
164
165 // user-defined algorithms
166
171 std::string get_URI( const std::string & app ) const;
172 };
173
174 // out stream operator
175
176 inline std::ostream& operator<<(std::ostream& s, const OpMonURI& obj)
177 {
178 return obj.print_object(s);
179 }
180
181 typedef std::vector<const OpMonURI*>::const_iterator OpMonURIIterator;
182
183 }
184}
185
186#endif
void set_by_ref(const std::string &name, T &value)
Set attribute value.
void set_enum(const std::string &name, const std::string &value)
Set attribute enumeration 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...
static const std::string & __get_type_str() noexcept
Definition OpMonURI.hpp:83
void set_path(const std::string &value)
Set "path" attribute value. property used to generate the final URI.
Definition OpMonURI.hpp:110
std::string get_URI(const std::string &app) const
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 OpMonURI.cpp:74
virtual ~OpMonURI() noexcept
void set_type(const std::string &value)
Set "type" attribute value. type of the OpMonFacility.
Definition OpMonURI.hpp:153
const std::string & get_type() const
Get "type" attribute value. type of the OpMonFacility.
Definition OpMonURI.hpp:137
friend class conffwk::DalFactory
Definition OpMonURI.hpp:24
static const std::string & __get_path_str() noexcept
Definition OpMonURI.hpp:82
static const std::string s_path
Definition OpMonURI.hpp:79
OpMonURI(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
static const std::string & s_class_name
Definition OpMonURI.hpp:37
friend class conffwk::DalObject
Definition OpMonURI.hpp:23
virtual void init(bool init_children)
Definition OpMonURI.cpp:55
const std::string & get_path() const
Get "path" attribute value. property used to generate the final URI.
Definition OpMonURI.hpp:94
static const std::string s_type
Definition OpMonURI.hpp:80
conffwk entry point
double offset
std::vector< constOpMonURI * >::const_iterator OpMonURIIterator
Definition OpMonURI.hpp:181
std::ostream & operator<<(std::ostream &s, const ActionPlan &obj)
Including Qt Headers.
static const std::string Stream
Definition OpMonURI.hpp:126
static const std::string Stdout
Definition OpMonURI.hpp:124
static const std::string File
Definition OpMonURI.hpp:125