Skip to content

Commit d86cb13

Browse files
authored
Merge pull request #83 from DUNE-DAQ/gcrone/documentation_update
Documentation update
2 parents d61995f + 7328308 commit d86cb13

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

docs/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,27 @@ The **Application** class has attributes defining the application's
2222
## Resources and ResourceSets
2323

2424
**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
2626
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
2929
implementation provided by the base class just checks that the object
3030
itself is not in the list of disabled objects. Derived classes can
3131
re-implement this method with whatever logic is needed to determine the
3232
state of the object, for example the **ResourceSetDisableAND** class
3333
provides an implementation that ANDs together the state of all of its
34-
contained objects.
34+
contained objects.
3535

3636
**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
3838
objects that will be ignored for the disabled check.
3939

4040
**ResourceSetDisableAND** is a container of **Resource**s which will
4141
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.
4343

4444
**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()
4646
method returning true if *any* of its contained **Resource**s are
4747
disabled.
4848

@@ -73,7 +73,7 @@ are also disabled.
7373
A list of all ResourceSets in the tree is generated by recursively
7474
calling `contained_resources()` and iterating over all the ResourceSets.
7575
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()`
7777
method to see if its state has been changed by the current content of
7878
the disabled set. It will repeat this procedure until an iteration
7979
that ends with the same number of disabled resources it started with.
@@ -95,7 +95,7 @@ single **DetDataReceiver**.
9595

9696
### Resource handling in the readout map
9797

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.
9999

100100
The **DetDataSender** is a **ResourceSetDisableAND** that contains a set of **DetectorStream** **Resource**s.
101101

docs/ReadoutMap.png

1.21 KB
Loading

docs/resourcetree.png

-332 Bytes
Loading

schema/confmodel/dunedaq.schema.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080

8181
<oks-schema>
8282

83-
<info name="" type="" num-of-items="49" oks-format="schema" oks-version="862f2957270" created-by="jcfree" created-on="mu2edaq13.fnal.gov" creation-time="20230123T223700" last-modified-by="gjc" last-modified-on="latitude" last-modification-time="20250730T085923"/>
83+
<info name="" type="" num-of-items="49" oks-format="schema" oks-version="862f2957270" created-by="jcfree" created-on="mu2edaq13.fnal.gov" creation-time="20230123T223700" last-modified-by="gjc" last-modified-on="latitude" last-modification-time="20250923T103939"/>
8484

8585
<class name="ActionPlan" description="A set of steps for an application to carry out a command">
8686
<attribute name="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 @@
139139
</class>
140140

141141
<class name="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-
<attribute name="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+
<attribute name="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"/>
143143
</class>
144144

145145
<class name="DaqModulesGroupById">
@@ -332,7 +332,7 @@
332332
<method name="parents" description="The algorithm calculates a vector of segments which are parents of given segment.&#xA;If the segment has parents referenced by the partition object, then:&#xA;- in case of C++ it fills the parents parameter; otherwise it throws {@link NotFoundException} exception">
333333
<method-implementation language="c++" prototype="void parents(const dunedaq::confmodel::Session&amp; session, std::list&lt; std::vector&lt;const dunedaq::confmodel::Resource *&gt; &gt;&amp; parents) const" body=""/>
334334
</method>
335-
<method name="is_disabled" description="">
335+
<method name="is_disabled" description="Method to be called from user code to determine if this Resource is disabled in the current configuration.">
336336
<method-implementation language="c++" prototype="bool is_disabled(const dunedaq::confmodel::ResourceTree&amp; session) const" body=""/>
337337
</method>
338338
<method name="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 @@
363363

364364
<class name="ResourceTree" is-abstract="yes">
365365
<relationship name="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-
<method name="disabled_components" description="">
366+
<method name="disabled_components" description="Get a reference to the DisabledResources object of this ResourceTree, initialising it if it has not already been initialised.">
367367
<method-implementation language="c++" prototype="const dunedaq::confmodel::DisabledResources&amp; disabled_components() const" body="BEGIN_HEADER_PROLOGUE&#xA;#include &quot;confmodel/DisabledResources.hpp&quot;&#xA;#include &quot;confmodel/Resource.hpp&quot;&#xA;END_HEADER_PROLOGUE&#xA;&#xA;BEGIN_PRIVATE_SECTION&#xA;mutable DisabledResources m_disabled_resources;&#xA;END_PRIVATE_SECTION&#xA;&#xA;&#xA;if (!m_disabled_resources.initialised()) {&#xA; m_disabled_resources.update(resource_root(),get_disabled());&#xA;}&#xA;return m_disabled_resources;"/>
368368
</method>
369-
<method name="resource_root" description="">
369+
<method name="resource_root" description="Pure virtual method to get the ResourceSet at the root of the ResourceTree.">
370370
<method-implementation language="c++" prototype="virtual const ResourceSet* resource_root() const = 0" body=""/>
371371
</method>
372372
</class>

0 commit comments

Comments
 (0)