DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
ResourceTree.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _ResourceTree_0_dunedaq__confmodel_0_confmodel_H_
4#define _ResourceTree_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
17 // forward declaration for classes used in relationships and algorithms
18
19namespace dunedaq {
20 namespace confmodel {
21 class Resource;
22 class ResourceSet;
23 }
24}
25
26
27 // prologue of method ResourceTree::disabled_components()
28
31
32namespace dunedaq {
33 namespace confmodel {
34
35 class ResourceTree : public virtual dunedaq::conffwk::DalObject {
36
38 friend class conffwk::DalObject;
39 friend class conffwk::DalFactory;
41
42 protected:
43
45 virtual ~ResourceTree() noexcept;
46 virtual void init(bool init_children);
47
48 public:
49
52 static const std::string& s_class_name;
53
54
64 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
65
66
76 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
77
78
79 protected:
80
81 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
82
83
84 private:
85
87
88 // extension of method ResourceTree::disabled_components()
90
91
92 public:
93
94 // relationship names
95
96 inline static const std::string s_disabled = "disabled";
97
98 static const std::string& __get_disabled_str() noexcept { return s_disabled; }
99
100
108 const std::vector<const dunedaq::confmodel::Resource*>&
110 {
111 std::lock_guard scoped_lock(m_mutex);
112 check();
113 check_init();
114 return m_disabled;
115 }
116
117
125 void
126 set_disabled(const std::vector<const dunedaq::confmodel::Resource*>& value);
127
128
129 public:
130
131 // user-defined algorithms
132
134
135
136 virtual const ResourceSet* resource_root() const = 0;
137 };
138
139 // out stream operator
140
141 inline std::ostream& operator<<(std::ostream& s, const ResourceTree& obj)
142 {
143 return obj.print_object(s);
144 }
145
146 typedef std::vector<const ResourceTree*>::const_iterator ResourceTreeIterator;
147
148 }
149}
150
151#endif
The base class for any generated DAL object.
Definition DalObject.hpp:45
std::ostream & print_object(std::ostream &s) const
print object details
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...
const dunedaq::confmodel::DisabledResources & disabled_components() const
static const std::string & __get_disabled_str() noexcept
virtual const ResourceSet * resource_root() const =0
static const std::string s_disabled
friend class conffwk::DalFactory
void set_disabled(const std::vector< const dunedaq::confmodel::Resource * > &value)
Set "disabled" relationship value. Resources that should not participate in the current run.
ResourceTree(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
const std::vector< const dunedaq::confmodel::Resource * > & get_disabled() const
Get "disabled" relationship value. Resources that should not participate in the current run.
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...
virtual void init(bool init_children)
static const std::string & s_class_name
friend class conffwk::DalObject
std::vector< const dunedaq::confmodel::Resource * > m_disabled
DisabledResources m_disabled_resources
conffwk entry point
double offset
std::vector< constResourceTree * >::const_iterator ResourceTreeIterator
std::ostream & operator<<(std::ostream &s, const ActionPlan &obj)
The DUNE-DAQ namespace.
Definition DataStore.hpp:57
msgpack::object obj