You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/README.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,27 +22,27 @@ The **Application** class has attributes defining the application's
22
22
## Resources and ResourceSets
23
23
24
24
**Resource** is an abstract class describing an item that can be
25
-
disabled directly. It has the method `disabled()` which can be called
25
+
disabled directly. It has the method `is_disabled(const dunedaq::confmodel::ResourceTree& session)` which can be called
26
26
by application code to determine if the object should be considered
27
-
disabled for this session. The [disabling logic](#the-resource-disabled-logic) calls the virtual
28
-
`is_disabled()` method to determine the state of the Resource. The
27
+
disabled for this session (Session is a subclass of ResourceTree). The [disabling logic](#the-resource-disabled-logic) calls the virtual
28
+
`compute_disabled_state(const std::set<std::string>& disabled_resources)` method to determine the state of the Resource, the disabled_resources argument is a list of UIDs of all the Resources that have been disabled so far. The
29
29
implementation provided by the base class just checks that the object
30
30
itself is not in the list of disabled objects. Derived classes can
31
31
re-implement this method with whatever logic is needed to determine the
32
32
state of the object, for example the **ResourceSetDisableAND** class
33
33
provides an implementation that ANDs together the state of all of its
34
-
contained objects.
34
+
contained objects.
35
35
36
36
**ResourceSet** is an abstract container of **Resource**s which can be disabled together. It
37
-
is itself a Resource (so can be nested). It defines a pure virtual method `contained_resources()`to get the list of contained resources. Developers should implement this method to extract any resources that need to be considered for determining the disabled state of the set from among the class's relationships. The class may have relationships to other Resource derived
37
+
is itself a Resource (so can be nested). It defines a pure virtual method `contained_resources()`which returns a vector of pointers to 'contained' resources. Developers should implement this method to extract any resources that need to be considered for determining the disabled state of the set from among the class's relationships. The class may have relationships to other Resource derived
38
38
objects that will be ignored for the disabled check.
39
39
40
40
**ResourceSetDisableAND** is a container of **Resource**s which will
41
41
be disabled if *all* of its **Resource**s are disabled. It provides a
42
-
final implementation of the ResourceSet::is_disabled() method.
42
+
final implementation of the ResourceSet::compute_disabled_state() method.
43
43
44
44
**ResourceSetDisableOR** is a container of **Resource**s which
45
-
provides a final implementation of the ResourceSet::is_disabled()
45
+
provides a final implementation of the ResourceSet::compute_disabled_state()
46
46
method returning true if *any* of its contained **Resource**s are
47
47
disabled.
48
48
@@ -73,7 +73,7 @@ are also disabled.
73
73
A list of all ResourceSets in the tree is generated by recursively
74
74
calling `contained_resources()` and iterating over all the ResourceSets.
75
75
Then it iterates over the list of **ResourceSet**s. If a ResourceSet
76
-
is not currently in the disabled set, it will call the `is_disabled()`
76
+
is not currently in the disabled set, it will call the `compute_disabled_state()`
77
77
method to see if its state has been changed by the current content of
78
78
the disabled set. It will repeat this procedure until an iteration
79
79
that ends with the same number of disabled resources it started with.
@@ -95,7 +95,7 @@ single **DetDataReceiver**.
95
95
96
96
### Resource handling in the readout map
97
97
98
-
The **DetectorToDaqConnection** is a **ResourceSet** with a custom implementation of `is_disabled()` that checks that the **DetDataReceiver** and at least one **DetDataSender** are enabled.
98
+
The **DetectorToDaqConnection** is a **ResourceSet** with a custom implementation of `compute_disabled_state()` that checks that the **DetDataReceiver** and at least one **DetDataSender** are enabled.
99
99
100
100
The **DetDataSender** is a **ResourceSetDisableAND** that contains a set of **DetectorStream****Resource**s.
<classname="ActionPlan"description="A set of steps for an application to carry out a command">
86
86
<attributename="execution_policy"description="How the application should dispatch the command to modules matched by each step of the ActionPlan"type="enum"range="modules-in-parallel,modules-in-series"init-value="modules-in-parallel"/>
@@ -139,7 +139,7 @@
139
139
</class>
140
140
141
141
<classname="DaqModulesGroup"description="Represents a group of DAQ Modules that can run commands in parallel or in series as one of the steps of an ActionPlan."is-abstract="yes">
142
-
<attributename="optional"type="bool"init-value="false"description="When true, the application will not generate a warning message if no modules in the application match this DaqModulesGroup"/>
142
+
<attributename="optional"description="When true, the application will not generate a warning message if no modules in the application match this DaqModulesGroup"type="bool"init-value="false"/>
143
143
</class>
144
144
145
145
<classname="DaqModulesGroupById">
@@ -332,7 +332,7 @@
332
332
<methodname="parents"description="The algorithm calculates a vector of segments which are parents of given segment.
If the segment has parents referenced by the partition object, then:
- in case of C++ it fills the parents parameter; otherwise it throws {@link NotFoundException} exception">
<methodname="compute_disabled_state"description="Virtual method to be implemented by subclasses containing the logic to determine if this object should be considered disabled.">
@@ -363,10 +363,10 @@
363
363
364
364
<classname="ResourceTree"is-abstract="yes">
365
365
<relationshipname="disabled"description="Resources that should not participate in the current run"class-type="Resource"low-cc="zero"high-cc="many"is-composite="yes"is-exclusive="no"is-dependent="yes"/>
366
-
<methodname="disabled_components"description="">
366
+
<methodname="disabled_components"description="Get a reference to the DisabledResources object of this ResourceTree, initialising it if it has not already been initialised.">
0 commit comments