Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions schema/appmodel/PDS.schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@

<oks-schema>

<info name="" type="" num-of-items="11" oks-format="schema" oks-version="862f2957270" created-by="mroda" created-on="theta.ph.liv.ac.uk" creation-time="20241011T123346" last-modified-by="gjc" last-modified-on="latitude" last-modification-time="20250818T145108"/>
<info name="" type="" num-of-items="14" oks-format="schema" oks-version="862f2957270" created-by="mroda" created-on="theta.ph.liv.ac.uk" creation-time="20241011T123346" last-modified-by="gjc" last-modified-on="latitude" last-modification-time="20260319T165326"/>

<include>
<file path="schema/confmodel/dunedaq.schema.xml"/>
Expand All @@ -93,7 +93,7 @@
<class name="DaphneApplication">
<superclass name="SmartDaqApplication"/>
<superclass name="ResourceSetDisableAND"/>
<relationship name="configuration" class-type="DaphneConf" low-cc="one" high-cc="one" is-composite="no" is-exclusive="no" is-dependent="no"/>
<relationship name="configuration" description="Deferred configuration to be loaded by DaphneControllerModule" class-type="DeferredConfig" low-cc="one" high-cc="one" is-composite="no" is-exclusive="no" is-dependent="no"/>
<relationship name="detector_connections" description="List of detector components controlled by this application" class-type="DetectorToDaqConnection" low-cc="zero" high-cc="many" is-composite="no" is-exclusive="no" is-dependent="no"/>
<relationship name="hermes_module_conf" class-type="HermesModuleConf" low-cc="zero" high-cc="one" is-composite="no" is-exclusive="no" is-dependent="no"/>
<method name="generate_modules" description="Generate DaqModule dal objects for streams of the application on the fly">
Expand All @@ -104,15 +104,16 @@
</method>
</class>

<class name="DaphneConf" description="Top entry for the configuraiton of a single daphne board">
<attribute name="timeout_ms" description="timeout used for the board operations" type="u16" range="1..60000" init-value="1000" is-not-null="yes"/>
<attribute name="time_reset" description="If True, it performs the time reset at configuration. If False, that is skipped" type="bool" init-value="True" is-not-null="yes"/>
<class name="DaphneBoard">
<relationship name="default_v2_settings" description="Value to be used during scrap" class-type="DaphneV2BoardConf" low-cc="one" high-cc="one" is-composite="no" is-exclusive="no" is-dependent="no"/>
<relationship name="default_v3_settings" description="Value to be used during scrap" class-type="DaphneV2BoardConf" low-cc="one" high-cc="one" is-composite="no" is-exclusive="no" is-dependent="no"/>
<relationship name="boards" class-type="DaphneMapEntry" low-cc="zero" high-cc="many" is-composite="no" is-exclusive="no" is-dependent="no"/>
<relationship name="default_v3_settings" class-type="DaphneV2BoardConf" low-cc="one" high-cc="one" is-composite="no" is-exclusive="no" is-dependent="no"/>
<method name="get_timeout" description="get the interval casted in ms">
<method-implementation language="C++" prototype="std::chrono::milliseconds get_timeout() const" body="BEGIN_HEADER_PROLOGUE&#xA;#include &lt;chrono&gt;&#xA;END_HEADER_PROLOGUE&#xA;&#xA;return std::chrono::milliseconds(get_timeout_ms());"/>
</method>
</class>

<class name="DaphneControllerModule">
<superclass name="DaqModule"/>
<attribute name="daphne_id" description="Id of DaphneBoardConf to be read from run time included configuration file." type="string" is-not-null="yes"/>
<relationship name="daphne_conf" class-type="DeferredConfig" low-cc="one" high-cc="one" is-composite="no" is-exclusive="no" is-dependent="no"/>
</class>

<class name="DaphneMapEntry">
Expand Down Expand Up @@ -150,6 +151,8 @@
<attribute name="slot_id" type="u16" range="0..15" is-not-null="yes"/>
<attribute name="crate_id" type="u16" range="0..1023" is-not-null="yes"/>
<attribute name="detector_id" type="u16" range="0..63" is-not-null="yes"/>
<attribute name="timeout_ms" description="timeout used for the board operations" type="u16" range="1..60000" init-value="1000" is-not-null="yes"/>
<attribute name="time_reset" description="If True, it performs the time reset at configuration. If False, that is skipped" type="bool" init-value="true" is-not-null="yes"/>
<relationship name="active_channels" class-type="DaphneV2Channel" low-cc="zero" high-cc="many" is-composite="no" is-exclusive="no" is-dependent="no"/>
<relationship name="active_afes" class-type="DaphneV2AFE" low-cc="zero" high-cc="many" is-composite="no" is-exclusive="no" is-dependent="no"/>
<relationship name="default_channel" class-type="DaphneV2Channel" low-cc="one" high-cc="one" is-composite="no" is-exclusive="no" is-dependent="no"/>
Expand All @@ -166,6 +169,9 @@
<method name="is_afe_used" description="check if an AFE is used">
<method-implementation language="c++" prototype="bool is_afe_used(size_t ch) const" body=""/>
</method>
<method name="timeout" description="get the interval cast into std::chrono::milliseconds">
<method-implementation language="c++" prototype="std::chrono::milliseconds timeout() const" body="BEGIN_HEADER_PROLOGUE&#xA;#include &lt;chrono&gt;&#xA;END_HEADER_PROLOGUE&#xA;&#xA;return std::chrono::milliseconds(get_timeout_ms());"/>
</method>
</class>

<class name="DaphneV2Channel">
Expand All @@ -176,20 +182,10 @@
<attribute name="stream_id" description="In Daphne v3 we might need to link a channel to a specific link ID, and this is the hook for the operation" type="s8" init-value="-1" is-not-null="yes"/>
</class>

<class name="DaphneControllerModule">
<superclass name="DaqModule"/>
<relationship name="daphne_conf" class-type="DaphneConf" low-cc="one" high-cc="one" is-composite="no" is-exclusive="no" is-dependent="no"/>
<relationship name="board_conf" class-type="DaphneV2BoardConf" low-cc="one" high-cc="one" is-composite="yes" is-exclusive="yes" is-dependent="yes"/>
</class>

<class name="DaphneV2ControllerModule">
<superclass name="DaphneControllerModule"/>
</class>

<class name="DaphneV3ControllerModule">
<superclass name="DaphneControllerModule"/>
</class>

<class name="DaphneV2LNA" description="info to generate Reg52 value">
<attribute name="clamp" description="0=auto setting, 1=1.5 Vpp, 2=1.15 Vpp, 3=0.6 Vpp" type="u8" range="0..3" init-value="0" is-not-null="yes"/>
<attribute name="integrator_disable" type="bool" init-value="true" is-not-null="yes"/>
Expand All @@ -208,6 +204,10 @@
</method>
</class>

<class name="DaphneV3ControllerModule">
<superclass name="DaphneControllerModule"/>
</class>

<class name="SSPLEDCalibModule" description="SSP LED Calib DAQ Module configuration">
<superclass name="DaqModule"/>
<attribute name="card_id" description="Physical card identifier (in the same host)" type="u32" init-value="0" is-not-null="yes"/>
Expand Down
27 changes: 16 additions & 11 deletions schema/appmodel/application.schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@

<oks-schema>

<info name="" type="" num-of-items="69" oks-format="schema" oks-version="862f2957270" created-by="gjc" created-on="thinkpad" creation-time="20230616T091343" last-modified-by="eflumerf" last-modified-on="ironvirt9.mshome.net" last-modification-time="20260203T131505"/>
<info name="" type="" num-of-items="70" oks-format="schema" oks-version="862f2957270" created-by="gjc" created-on="thinkpad" creation-time="20230616T091343" last-modified-by="gjc" last-modified-on="latitude" last-modification-time="20260319T120221"/>

<include>
<file path="schema/confmodel/dunedaq.schema.xml"/>
Expand Down Expand Up @@ -172,6 +172,16 @@
<relationship name="module_configuration" class-type="DataHandlerConf" low-cc="one" high-cc="one" is-composite="no" is-exclusive="no" is-dependent="no"/>
</class>

<class name="DataMoveCallbackConf">
<attribute name="source_id" type="u32" init-value="0" is-not-null="yes"/>
<attribute name="data_type" description="Name of the output data type. Should be defined via a call to DUNE_DAQ_TYPESTRING" type="string" init-value="WIBEthFrame"/>
</class>

<class name="DataMoveCallbackDescriptor">
<attribute name="uid_base" description="Base for callback UID string. May be combined with a source id" type="string" is-not-null="yes"/>
<attribute name="data_type" description="string identifying type of data passed as a callback parameter" type="string" is-not-null="yes"/>
</class>

<class name="DataProcessor">
<attribute name="queue_sizes" type="u32" init-value="10000"/>
<attribute name="thread_names_prefix" type="string" init-value="postproc-"/>
Expand Down Expand Up @@ -230,6 +240,11 @@
<relationship name="configuration" class-type="DataWriterConf" low-cc="one" high-cc="one" is-composite="no" is-exclusive="no" is-dependent="no"/>
</class>

<class name="DeferredConfig">
<attribute name="configuration_file" description="Additional configuration file to be included at run time to provide detailed configuration of the daphne board" type="string" is-not-null="yes"/>
<attribute name="entry_uid" description="UID of the object to be loaded from the deferred configuration file" type="string" is-not-null="yes"/>
</class>

<class name="FakeDataApplication">
<superclass name="ResourceSetDisableAND"/>
<superclass name="SmartDaqApplication"/>
Expand Down Expand Up @@ -406,16 +421,6 @@
<attribute name="data_type" description="string identifying type of data transferred through this queue" type="string" is-not-null="yes"/>
</class>

<class name="DataMoveCallbackConf">
<attribute name="source_id" type="u32" init-value="0" is-not-null="yes"/>
<attribute name="data_type" description="Name of the output data type. Should be defined via a call to DUNE_DAQ_TYPESTRING" type="string" init-value="WIBEthFrame"/>
</class>

<class name="DataMoveCallbackDescriptor">
<attribute name="uid_base" description="Base for callback UID string. May be combined with a source id" type="string" is-not-null="yes"/>
<attribute name="data_type" description="string identifying type of data passed as a callback parameter" type="string" is-not-null="yes"/>
</class>

<class name="ReadoutApplication">
<superclass name="SmartDaqApplication"/>
<superclass name="ResourceSetDisableAND"/>
Expand Down
15 changes: 2 additions & 13 deletions src/DaphneApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "ConfigObjectFactory.hpp"
#include "appmodel/appmodelIssues.hpp"
#include "appmodel/FelixDataSender.hpp"
#include "appmodel/DaphneConf.hpp"
#include "appmodel/DaphneMapEntry.hpp"
#include "appmodel/DaphneV2BoardConf.hpp"
#include "appmodel/DaphneV2Channel.hpp"
Expand All @@ -30,6 +29,7 @@
#include "appmodel/DaphneV2ControllerModule.hpp"
#include "appmodel/DaphneV3ControllerModule.hpp"
#include "appmodel/DaphneApplication.hpp"
#include "appmodel/DeferredConfig.hpp"
#include "appmodel/FelixDetectorToDaqConnection.hpp"
#include "appmodel/NetworkDetectorToDaqConnection.hpp"
#include "appmodel/NWDetDataSender.hpp"
Expand Down Expand Up @@ -63,12 +63,6 @@ DaphneApplication::generate_modules(std::shared_ptr<appmodel::ConfigurationHelpe

auto daphne_conf = get_configuration();

std::map<std::string, const DaphneV2BoardConf*> conf_map;
auto confs = daphne_conf->get_boards();
for ( const auto & c : confs ) {
conf_map[c->get_key()] = c->get_conf();
}

// these maps are all indexed on the board id {detector].{crate}.{slot}
std::map<std::string, bool> v3_map;
std::map<std::string, const confmodel::NetworkInterface*> interfaces;
Expand Down Expand Up @@ -181,15 +175,10 @@ DaphneApplication::generate_modules(std::shared_ptr<appmodel::ConfigurationHelpe

for ( const auto & [id, v3] : v3_map ) {

auto conf_it = conf_map.find(id);
if ( conf_it == conf_map.end() ) {
throw MissingDaphne(ERS_HERE, id);
}
auto conf = conf_it->second;

conffwk::ConfigObject module_obj = obj_fac.create( (v3 ? "DaphneV3ControllerModule" : "DaphneV2ControllerModule"), fmt::format("controller-{}", id) );
module_obj.set_obj("daphne_conf", & daphne_conf -> config_object() );
module_obj.set_obj("board_conf", & conf -> config_object() );
module_obj.set_by_val<std::string>("daphne_id", id);

auto module = obj_fac.get_dal<confmodel::DaqModule>(module_obj);
modules.push_back(module);
Expand Down