Skip to content

Commit 0657d0f

Browse files
author
John Freeman
committed
JCF: add the actual content of the added packages mentioned in the last commit now
1 parent 1264905 commit 0657d0f

File tree

19 files changed

+4356
-0
lines changed

19 files changed

+4356
-0
lines changed
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# connectivityserver
2+
3+
This service provides a very simple flask based
4+
server to serve connection information to DAQ applications.
5+
6+
7+
## REST interface
8+
9+
The server reponds to the following uris
10+
11+
### /publish
12+
Allows publication of connection information. The content of the
13+
request should be JSON encoded. For example, the following json file
14+
can be published using curl.
15+
16+
```
17+
> cat publish.json
18+
{
19+
"connections":[
20+
{
21+
"connection_type":0,
22+
"data_type":"TPSet",
23+
"uid":"DRO-000-tp_to_trigger",
24+
"uri":"tcp://192.168.1.100:1234"
25+
},
26+
{
27+
"connection_type":0,
28+
"data_type":"TPSet",
29+
"uid":"DRO-001-tp_to_trigger",
30+
"uri":"tcp://192.168.1.100:1235"
31+
}
32+
],
33+
"partition":"ccTest"
34+
}
35+
36+
> curl -d @publish.json -H "content-type: application/json" \
37+
http://connection-flask.connections:5000/publish
38+
```
39+
40+
### /getconnection/<partition>
41+
This uri returns a list of connections matching the 'uid_regex' and
42+
'data_type' specified in the JSON encoded request.
43+
44+
```
45+
curl -d '{"uid_regex":"DRO.*","data_type":"TPSet"}' \
46+
-H "content-type: application/json" \
47+
http://connection-flask.connections:5000/getconnection/ccTest
48+
[{"uid": "DRO-000-tp_to_trigger", "uri": "tcp://192.168.1.100:1234", "connection_type": 0, "data_type": "TPSet"}, {"uid": "DRO-001-tp_to_trigger", "uri": "tcp://192.168.1.100:1235", "connection_type": 0, "data_type": "TPSet"}]
49+
```
50+
51+
52+
### /retract
53+
This uri should be used to remove published connections. The request should be JSON encoded with the keys "partition" and "connections" with the latter being an array of "connection_id" and "data_type" values.
54+
55+
56+
### /retract-partition
57+
This uri should be used to remove all published connections from the
58+
given partition. The request should be JSON encoded with one field "partition" naming the partition to be retracted.
59+
60+
## Running the server locally from the command line
61+
The server is intended to be run under the Gunicorn web server.
62+
63+
```
64+
gunicorn -b 0.0.0.0:5000 --workers=1 --worker-class=gthread --threads=2 \
65+
--timeout 5000000000 connectivityserver.connectionflask:app
66+
```
67+
68+
Some debug information will be printed by the connection-flask if the
69+
environment variable 'CONNECTION_FLASK_DEBUG' is set to a number
70+
greater than 0. Currently 1 will print timing information for the
71+
publish/lookup calls. 2 will give information about what was
72+
published/looked up and 3 is even more verbose printing the actual
73+
JSON of the requests.
74+
75+
76+
-----
77+
78+
<font size="1">
79+
_Last git commit to the markdown source of this page:_
80+
81+
82+
_Author: Gordon Crone_
83+
84+
_Date: Thu Oct 16 16:54:02 2025 +0100_
85+
86+
_If you see a problem with the documentation on this page, please file an Issue at [https://github.com/DUNE-DAQ/connectivityserver/issues](https://github.com/DUNE-DAQ/connectivityserver/issues)_
87+
</font>
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# connectivityserver
2+
3+
This service provides a very simple flask based
4+
server to serve connection information to DAQ applications.
5+
6+
## Installation
7+
8+
To build the docker image of develop just do
9+
```bash
10+
docker buildx build --tag ghcr.io/dune-daq/connectivityserver:latest .
11+
```
12+
Or, if you want to specify a tag
13+
```bash
14+
docker buildx build --tag ghcr.io/dune-daq/connectivityserver:v1.3.0 --build-arg VERSION=v1.3.0 .
15+
```
16+
17+
Apply the kubernetes manifest from connectivityserver.yaml. This
18+
should start a service called connectionservice in the namespace
19+
connections.
20+
21+
```
22+
kubectl apply -f connectivityserver.yaml
23+
```
24+
25+
To test the basic operation of the server, you can connect to pod in the k8s cluster and try getting the root document.
26+
27+
```
28+
> kubectl exec myPod -i -t -- bash
29+
[root@myPod /]# curl http://connectionservice.connections:5000
30+
<h1>Dump of configuration dictionary</h1><h2>Active partitions</h2><p>None</p><hr><h2>Server statistics</h2><p>Since 2023-03-16 09:15:06.571492</p><p>0 calls to publish in total time 0:00:00 (average 0 &micro;s per call)</p><p>0 calls to lookup in total time 0:00:00 (average 0 &micro;s per call)</p><p>Maximum number of partitions active = 0</p>
31+
[root@myPod /]#
32+
```
33+
34+
## Connectivityserver operation
35+
Please refer to the documentaion in the
36+
connectivityserver package [https://github.com/DUNE-DAQ/connectivityserver].
37+
38+
39+
-----
40+
41+
<font size="1">
42+
_Last git commit to the markdown source of this page:_
43+
44+
45+
_Author: Gordon Crone_
46+
47+
_Date: Thu Oct 16 16:54:02 2025 +0100_
48+
49+
_If you see a problem with the documentation on this page, please file an Issue at [https://github.com/DUNE-DAQ/connectivityserver/issues](https://github.com/DUNE-DAQ/connectivityserver/issues)_
50+
</font>

docs/packages/ctbmodules/README.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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>

docs/packages/daqpytools/README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# daqpytools
2+
[![Lint](https://github.com/DUNE-DAQ/daqpytools/actions/workflows/lint.yml/badge.svg)](https://github.com/DUNE-DAQ/daqpytools/actions/workflows/lint.yml)
3+
[![pytest](https://github.com/DUNE-DAQ/daqpytools/actions/workflows/run_pytest.yml/badge.svg)](https://github.com/DUNE-DAQ/daqpytools/actions/workflows/run_pytest.yml)
4+
5+
Set of importable tools used to simplify DAQ development in python.
6+
7+
8+
## Scope
9+
This provides a set of tools that are used in python applications, along with their unit tests. Currently, the following tools are defined
10+
- logging - [code](https://github.com/DUNE-DAQ/daqpytools/tree/develop/src/daqpytools/logging), [wiki](https://github.com/DUNE-DAQ/daqpytools/wiki/Logging)
11+
12+
## Indended use case
13+
This repo will serve as the indended source of distribution standard tooling. Any python tool that is used by multiple repositories should be defined here.
14+
15+
## Setup instructions
16+
For general users, no setup is required - when developing your python applications, it is sufficient to include e.g.
17+
```python
18+
from daqpytools.logging.logger import get_daq_logger
19+
log = get_daq_logger(...)
20+
```
21+
For developers, see the developer wiki.
22+
23+
24+
-----
25+
26+
<font size="1">
27+
_Last git commit to the markdown source of this page:_
28+
29+
30+
_Author: Pawel Plesniak_
31+
32+
_Date: Fri Nov 14 16:40:01 2025 +0100_
33+
34+
_If you see a problem with the documentation on this page, please file an Issue at [https://github.com/DUNE-DAQ/daqpytools/issues](https://github.com/DUNE-DAQ/daqpytools/issues)_
35+
</font>

0 commit comments

Comments
 (0)