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 tool that is provided by artdaq database.

Usage: [operation] [config name prefix]

Example: exportConfiguration demo_safemode00003 importConfiguration demo_safemode getListOfAvailableRunConfigurationPrefixes getListOfAvailableRunConfigurations getListOfAvailableRunConfigurations demo_ archiveRunConfiguration demo_safemode 23 #where 23 is a run number updateArchivedRunConfiguration demo_safemode 23 #where 23 is a run number getListOfArchivedRunConfigurations 23 #where 23 is a run number exportArchivedRunConfiguration 23/demo_safemode00003 #where 23/demo_safemode00003 is a configuration name listDatabases listCollections 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