-
Notifications
You must be signed in to change notification settings - Fork 1
Tutorial
This tutorial should give an introduction to trigger algorithm developers how to set up the environment needed, make changed, compile, build and run the system
DUNE DAQ consists of several Modules that themselfs consist of Plugins. In this tutorial, we will see how to create a plugin for the triggermodules module.
Detailed documentation can be found at https://github.com/DUNE- DAQ/appfwk/wiki/Compiling-and-running-under-v2.2.0
We want to work with a specific tag/version, and within a specific working directory. In our example, we use:
export VERSION=dunedaq-v2.2.0
export MYDIR=dunedaq
Set up daq-builtools via your shell:
git clone https://github.com/DUNE-DAQ/daq-buildtools.git -b $VERSION
source daq-buildtools/dbt-setup-env.shThe expected answer is
Added /your/path/to/daq-buildtools/bin to PATH
Added /your/path/to/daq-buildtools/scripts to PATH
DBT setuptools loaded
mkdir $MYDIR
cd $MYDIR
dbt-create.sh $VERSIONThis may take a couple of minutes and will create your working area in the $MYDIR location.
DUNE DAQ consists of several mod- ules. The most important one is appfwk that provides the basic func- tionalities.
The data selection is based on two modules: triggermodules and triggeralgs.
The source code for the modules are located in sourcecode. Following commands can be run to check out all the required modules:
cd sourcecode
MODULES="appfwk triggermodules triggeralgs cmdlib ers filecmd listrev restcmd"
for MODULE in $MODULES
do
git clone https://github.com/DUNE-DAQ/$MODULE.git
cd $MODULE
git fetch;git checkout $VERSION
cd ..
doneYou should now have a complete working environment!
In this tutorial, we will use
$MYDIR/sourcecode/DAQDuneTrigger/Plugins/ TriggerPrimitiveFromFile.cpp as an example.
It simply takes a (shorter) waveform from a csv (comma-separated values) file indicated by the user, formatted as follows:
| time_start | time_over_threshold | time_peak | channel | adc_integral | detid | type |
|---|---|---|---|---|---|---|
| value, | value, | value, | value, | value, | value, | value, |
| ... | ||||||
| ... |
moo is a tool for code generation based on schema files using either python or jsonnet.
A complete moo documentation is available
We want our module and our plugins to be configurable.
Typically, we use three different kinds of moo source files in the schema folder of a module.
- the plugin schema
- the plugin make
- the app / command facility
We will give a short introductions to all of them. An exhaustive documentation is available here.