DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
DisabledResources.hpp
Go to the documentation of this file.
1#ifndef DUNEDAQDAL_DISABLED_RESOURCES_H
2#define DUNEDAQDAL_DISABLED_RESOURCES_H
3
5
6#include <set>
7#include <string>
8
9
11
12 class Session;
13 class ResourceSet;
15
17 {
18
19 friend class Session;
20 friend class Resource;
21
22 private:
23
24 std::set<std::string> m_disabled;
25 bool m_initialised{false};
26 void fill(const ResourceSet& rs,
27 std::vector<const ResourceSet*>& all_resource_sets,
28 std::set<const Resource*>& simple_resources,
29 TestCircularDependency& cd_fuse);
30
31 void
33 {
34 m_disabled.insert(component.UID());
35 }
36
37 void
39
40 size_t
41 size() noexcept
42 {
43 return m_disabled.size();
44 }
45
46 public:
47
48 DisabledResources() = default;
50 std::vector<const Resource*> initial_list);
51
52 ~DisabledResources() = default;
53
54 void update(const ResourceSet* root,
55 std::vector<const Resource*> initial_list);
56
57 bool
59 return !m_disabled.contains(component->UID());
60 }
61
62 [[nodiscard]] bool initialised() const {return m_initialised;}
63 };
64} // namespace dunedaq::confmodel
65
66#endif // DUNEDAQDAL_DISABLED_RESOURCES_H
void fill(const ResourceSet &rs, std::vector< const ResourceSet * > &all_resource_sets, std::set< const Resource * > &simple_resources, TestCircularDependency &cd_fuse)
bool is_enabled(const Resource *component) const
void update(const ResourceSet *root, std::vector< const Resource * > initial_list)
void disable(const Resource &component)