Project

General

Profile

Ardaq database is a part of the artdaq bundle and adds the ability to manage artdaq configurations stored in the FHICL, JSON, and XML formats. It is implemented as a persistence layer on top of the Filesystem, UconDB, and Mongo databases and distributed with artdaq. Users can call artdaq database API directly or use it indirectly as a part of artdaq tools such as the web config editor and the simple daq interface. Artdaq database maintains all users data internally in the JSON format, and the database API performs the conversion from FHICL and XML to JSON and reverses it back. The choice of JSON format for internal storage was made due to its similarity to FHICL and wide support among database vendors. This also allows performing searches inside user data. The database API is written in C/C++ and includes JavaScript and Python bindings generated with SWIG.

In the typical case, users should have the ardaq database and web config editor packages installed as a part of the artdaq bundle. The default installation is configured to use the Filesystem database, which is deployed in the ${HOME}/databases/filesystem directory.

Users can log into their development or test server and execute the "source ~/.database.bash.rc" command, which sets up the artdaq database and web configuration packages. Users then can import/export their artdaq configurations using the conftool.sh tool that is provided by artdaq database.

Usage: conftool.py [operation] [config name prefix]

Example:
 conftool.py exportConfiguration demo_safemode00003
 conftool.py importConfiguration demo_safemode
 conftool.py getListOfAvailableRunConfigurationPrefixes
 conftool.py getListOfAvailableRunConfigurations
 conftool.py getListOfAvailableRunConfigurations demo_
 conftool.py archiveRunConfiguration demo_safemode 23 #where 23 is a run number
 conftool.py updateArchivedRunConfiguration demo_safemode 23 #where 23 is a run number
 conftool.py getListOfArchivedRunConfigurations 23 #where 23 is a run number
 conftool.py exportArchivedRunConfiguration 23/demo_safemode00003 #where 23/demo_safemode00003 is a configuration name
 conftool.py listDatabases
 conftool.py listCollections
 conftool.py readDatabaseInfo

Artdaq database API specification

Configuration document specification

Artdaq Database Connection URI

Artdaq Web Config Editor

Artdaq Database Replication

A step-by-step example of how to edit a configuration from the database