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 TestCircularDependency& cd_fuse);
29
30 void
32 {
33 m_disabled.insert(component.UID());
34 }
35
36 void
38
39 size_t
40 size() noexcept
41 {
42 return m_disabled.size();
43 }
44
45 public:
46
47 DisabledResources() = default;
49 std::vector<const Resource*> initial_list);
50
51 ~DisabledResources() = default;
52
53 void update(const ResourceSet* root,
54 std::vector<const Resource*> initial_list);
55
56 bool
58 return !m_disabled.contains(component->UID());
59 }
60
61 [[nodiscard]] bool initialised() const {return m_initialised;}
62 };
63} // namespace dunedaq::confmodel
64
65#endif // DUNEDAQDAL_DISABLED_RESOURCES_H
bool is_enabled(const Resource *component) const
void update(const ResourceSet *root, std::vector< const Resource * > initial_list)
void fill(const ResourceSet &rs, std::vector< const ResourceSet * > &all_resource_sets, TestCircularDependency &cd_fuse)
void disable(const Resource &component)