Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding timing database #109

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Adding timing database #109

wants to merge 1 commit into from

Conversation

dianaAntic
Copy link
Contributor

@dianaAntic dianaAntic commented May 13, 2024

To verify the functionality of the OKS configuration, the testing of nanotimingrc on real hardware was required.

This PR adds the required database file for setting up the minimal OKS configuration for a successful RC run.

To test, I ran the following command on kipper in a recent work env NFD_DEV_240507_C8:
nanotimingrc --partition-number 7 timinglibs/test_config/ test-session
making sure that the name of the test session matches the name given in this object: <obj class="Session" id="test-session"> in the data file.
The folder timinglibs/test_config/ must include a boot.json file which contains the necessary setup for the RC run - the following is the json content I used:

{
    "apps": {
        "thi": {
            "exec": "daq_application_ssh",
            "host": "thi",
            "port": 3333
        },
        "tmc": {
            "exec": "daq_application_ssh",
            "host": "tmc",
            "port": 3334
        }
    },
    "env": {
        "DUNEDAQ_ERS_DEBUG_LEVEL": "getenv_ifset",
        "DUNEDAQ_ERS_ERROR": "erstrace,throttle,lstdout",
        "DUNEDAQ_ERS_FATAL": "erstrace,lstdout",
        "DUNEDAQ_ERS_INFO": "erstrace,throttle,lstdout",
        "DUNEDAQ_ERS_VERBOSITY_LEVEL": "getenv:1",
        "DUNEDAQ_ERS_WARNING": "erstrace,throttle,lstdout"
    },
    "exec": {
        "consvc_ssh": {
            "args": [
                "--bind=0.0.0.0:{APP_PORT}",
                "--workers=1",
                "--worker-class=gthread",
                "--threads=2",
                "--timeout=0",
                "--pid={APP_NAME}_{APP_PORT}.pid",
                "connection-service.connection-flask:app"
            ],
            "cmd": "gunicorn",
            "env": {
                "CONNECTION_FLASK_DEBUG": "getenv:2",
                "PATH": "getenv",
                "PYTHONPATH": "getenv"
            }
        },
        "daq_application_ssh": {
            "args": [
                "--name",
                "{APP_NAME}",
                "-c",
                "{CMD_FAC}",
                "-i",
                "{INFO_SVC}",
                "--configurationService",
                "oksconfig:config/timing.data.xml"
            ],
            "cmd": "daq_application",
            "comment": "Application profile using PATH variables (lower start time)",
            "env": {
                "CET_PLUGIN_PATH": "getenv",
                "CMD_FAC": "rest://localhost:{APP_PORT}",
                "CONNECTION_SERVER": "kipper.phy.bris.ac.uk",
                "DETCHANNELMAPS_SHARE": "getenv",
                "DUNEDAQ_DB_PATH": "getenv",
                "DUNEDAQ_SHARE_PATH": "getenv",
                "INFO_SVC": "file://info_{APP_NAME}_{APP_PORT}.json",
                "LD_LIBRARY_PATH": "getenv",
                "PATH": "getenv",
                "TIMING_SHARE": "getenv",
                "TRACE_FILE": "getenv:/tmp/trace_buffer_{APP_HOST}_{DUNEDAQ_PARTITION}"
            }
        }
    },
    "external_connections": [],
    "hosts-ctrl": {
        "connectionservice": "kipper.phy.bris.ac.uk",
        "thi": "kipper.phy.bris.ac.uk",
        "tmc": "kipper.phy.bris.ac.uk"
    },
    "hosts-data": {
        "thi": "kipper.phy.bris.ac.uk",
        "tmc": "kipper.phy.bris.ac.uk"
    },
    "response_listener": {
        "port": 56789
    },
    "services": {
        "connectionservice": {
            "exec": "consvc_ssh",
            "host": "connectionservice",
            "port": 5000,
            "update-env": {
                "CONNECTION_PORT": "{APP_PORT}"
            }
        }
    }
}

Also, for the TimingHardwareInterface object, a connections_file is required and this is the content of the one whose path I used:

<?xml version="1.0" encoding="UTF-8"?>

<connections>
  <connection id="TEST_CTL"          uri="ipbusudp-2.0://192.168.200.16:50001" address_table="file://${TIMING_SHARE}/config/etc/addrtab/v7xx/master/top.xml" />
  <connection id="TEST_EPT"          uri="ipbusudp-2.0://192.168.200.41:50001" address_table="file://${TIMING_SHARE}/config/etc/addrtab/v7xx/endpoint_fmc/top.xml" />
</connections>

which is a Controller-Endpoint connection that's currently connected and ping-able in the Bristol lab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant