Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

HPS uses a database conditions backend which is accessible through the DatabaseConditionsManager.

...

Database Connection

Command Line Options

The URL, username and password for connecting to the database can be specified from the command line as Java properties.

The default connection information corresponds to the following command line options:

Code Block
titleConditions Database Command Line Options
java -Dorg.hps.conditions.url=jdbc:mysql://hpsdb.jlab.org:3306/hps_conditions \ 
    -Dorg.hps.conditions.user=hpsuser \
    -Dorg.hps.conditions.password=darkphoton [...]

These options should be provided immediately after the java command as they are global Java properties and not command line options provided to a specific application or program within hps-java.

The default database connection uses a read-only replica of the primary MySQL conditions database at Jefferson Lab.  Therefore, when connecting from a computer which is outside of the jlab.org domain, you will not be able to make any changes to this database.  If you need to insert records into the database, i.e. for new calibrations, then it must be done behind the JLab firewall.  You must provide proper credentials that will allow writing to the database (they are not given here!).

Using a Local Conditions Database

Support for SQLite is included in the database conditions manager for running jobs locally without an internet connection.

A db file may be obtained by using the following commands:

Code Block
titleDownloading SQLite Database
https://github.com/JeffersonLab/hps-conditions-backup/raw/master/hps_conditions.db.tar.gz
tar -zxvf hps_conditions.db.tar.gz

The local db file can be used by using this option when running Java:

Code Block
titleConnecting to Local Conditions Database
java -Dorg.hps.conditions.url=jdbc:sqlite:hps_conditions.db [...]

No username or password is required when connecting locally in this way.

Configuring Detector Conditions for a Job

Command Line Setup

The conditions configuration is typically done via arguments to command line programs.

...