Skip to content
Gordon Crone edited this page May 19, 2023 · 10 revisions

Using CoreManager

Checkout and build the code

Set TDAQ_DB_PATH environment variable

TDAQ_DB_PATH is a a colon : separated list of paths to search for OKS configuration files. Currently to find all the necessary schema files it should include all the packages that have schema. In the sourcecode directory where you cloned the packages. If you want to keep your configuration data separate, you can add a directory of your choice to the end of the list:

 export TDAQ_DB_PATH=${PWD}/dunedaqdal:${PWD}/cpuburner:${HOME}/configs

Create an OKS configuration

Copy the file cpuburner/data/burn.data.xml and edit it with the OKS database editor dbe_main. See the notes in the README in the gcrone/coremanager branch of dunedaqdal.

Create a JSON configuration for nanorc to boot

Create a session directory for the configuration with an empty data subdirectory (nanorc will complain if it can't find the data directory).

 mkdir -p burn/data

Add a boot.json like the following to the session directory:

{
    "apps": {
        "burner-1": {
            "exec": "daq_application_ssh",
            "host": "burner",
            "port": 3333
        }
    },
    "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",
        "TDAQ_DB_PATH": "getenv"
    },
    "exec": {
        "daq_application_ssh": {
            "args": [
                "--name",
                "{APP_NAME}",
                "-c",
                "{CMD_FAC}",
                "-i",
                "{INFO_SVC}",
                "--configurationService",
                "oksconfig:data/burn.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_PORT": "5000",
                "CONNECTION_SERVER": "127.0.0.1",
                "DETCHANNELMAPS_SHARE": "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": {
        "burner": "localhost"
    },
    "hosts-data": {
        "burner": "localhost"
    },
    "response_listener": {
        "port": 56789
    }
}

Run the session with nanorc

 nanorc burn burner-session