|
| 1 | +# ctbmodules - DUNE DAQ module to control and read out the CTB hardware |
| 2 | + |
| 3 | +Ported from original implementation in redmine: |
| 4 | + |
| 5 | +<https://cdcvs.fnal.gov/redmine/projects/dune-artdaq/repository/revisions/develop/show/dune-artdaq/Generators/pennBoard> |
| 6 | + |
| 7 | +<https://cdcvs.fnal.gov/redmine/projects/dune-artdaq/repository/revisions/develop/entry/dune-artdaq/Generators/TriggerBoardReader_generator.cc> |
| 8 | + |
| 9 | +<https://cdcvs.fnal.gov/redmine/projects/dune-artdaq/repository/revisions/develop/entry/dune-artdaq/Generators/TriggerBoardReader.hh> |
| 10 | + |
| 11 | + |
| 12 | +## Instructions to update the configuration and run with dunedaq v5 line |
| 13 | + |
| 14 | +### Area setup |
| 15 | +First of all you need a v5 area. |
| 16 | +To do this follow the instructions in the daqconf wiki, for example [fddaq-v5.3.2](https://github.com/DUNE-DAQ/daqconf/wiki/Setting-up-a-fddaq%E2%80%90v5.3.2-software-area). |
| 17 | + |
| 18 | +Locally, in the top area, you also need the [base configuration repository](https://gitlab.cern.ch/dune-daq/online/ehn1-daqconfigs). |
| 19 | +Please note that the repo on gitlab are only accessible via ssh key, so please register one in the CERN gitlab. |
| 20 | +I recommend you also set in your area a `.netrc` file as in the `np04daq` home, remember to change login to your CERN username. |
| 21 | +After that you can simply |
| 22 | +```bash |
| 23 | +git clone ssh://git@gitlab.cern.ch:7999/dune-daq/online/ehn1-daqconfigs.git |
| 24 | +``` |
| 25 | +Or alternatively |
| 26 | +```bash |
| 27 | +cpm-setup -b fddaq-v5.3.2 ehn1-daqconfigs |
| 28 | +``` |
| 29 | +The first one is a direct clone, while the second sets up the configuration repo to do some more advance operation, so the default branches might be a little strange. |
| 30 | +Further domentation on the various `cpm-*` commands can be found in [the runconftools documentation](https://github.com/DUNE-DAQ/runconftools/blob/develop/docs/README.md). |
| 31 | +The second only works if you have setup the `.netrc` file correctly. |
| 32 | +To conclude, just |
| 33 | +```bash |
| 34 | +source ehn1-daqconfigs/setup_db_path.sh |
| 35 | +``` |
| 36 | + |
| 37 | +### Update the CTB configuration |
| 38 | +The ehn1-daqconfigs contains already a valid configuration for the CTB. |
| 39 | +Due to the implementation of HLTs and LLTs as confmodel::resource, it's best if any branch of ehn1-daqconfigs contains only one version of each. |
| 40 | +So, as CTB experts the only thing you should do is to update the value of the objects already created in ehn1-daqconfigs. |
| 41 | + |
| 42 | +In order to do so, there is a script called `update_ctb_settings`. |
| 43 | +Typical usage is: |
| 44 | +```bash |
| 45 | +update_ctb_settings ehn1-daqconfigs/sessions/np02-session.data.xml <your_json_file> |
| 46 | +``` |
| 47 | +This will do the following: |
| 48 | + - It will change the value of every objects in the configuration related to the CTB according to the the json file you provide |
| 49 | + - It will enable/disable HLTs and LLTs according to your configuration |
| 50 | +Please keep in mind that HLTs can also be enabled/disabled via the shifter interface (see dedicated section). |
| 51 | + |
| 52 | +Once you are happy with the changes, you can commit and push the changes on a branch on ehn1-daqconfigs and open a Merge request toward the dedicate branch. |
| 53 | + |
| 54 | +### Run the CTB configuration |
| 55 | +in order to run, start using the shifter interface in local mode: |
| 56 | +```bash |
| 57 | +runconf-shifter-ui -l -d ehn1-daqconfigs |
| 58 | +``` |
| 59 | +From the inerface select which components you need, select which HLTs you want to enable and click `create`. |
| 60 | +The output of the shifter interface will tell you how to run. |
| 61 | + |
| 62 | + |
| 63 | +----- |
| 64 | + |
| 65 | +<font size="1"> |
| 66 | +_Last git commit to the markdown source of this page:_ |
| 67 | + |
| 68 | + |
| 69 | +_Author: Marco Roda_ |
| 70 | + |
| 71 | +_Date: Wed Jun 18 11:19:38 2025 +0200_ |
| 72 | + |
| 73 | +_If you see a problem with the documentation on this page, please file an Issue at [https://github.com/DUNE-DAQ/ctbmodules/issues](https://github.com/DUNE-DAQ/ctbmodules/issues)_ |
| 74 | +</font> |
0 commit comments