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.

Basic Usage

Command Line Setup

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

The detector and run number to be used can be provided to the job manager to override these settings from input files.

Code Block
languagejava
themeMidnight
java -jar ../hps-java/distribution/target/hps-distribution-4.0-SNAPSHOT-bin.jar -d detector_name -R 5772 [args]

Configuration of the EvioToLcio utility is similar.

Code Block
languagejava
themeMidnight
java -cp ../hps-java/distribution/target/hps-distribution-4.0-SNAPSHOT-bin.jar org.hps.evio.EvioToLcio -d detector_name -R 5772 [args]

Providing conditions in this way will cause the manager to automatically "freeze" after it initializes so that run numbers and detector header information from the input file will be ignored in the job.

Additionally, tags can be specified to filter out the available conditions records in the job, which is described in the Detector Conditions Tags documentation.

Java Initialization

The HPS conditions manager is automatically installed by creating a new instance of the DatabaseConditionsManager class.

...

Users should not normally need to install their own conditions manager as this is done in the setup of the various job tools, but it may be necessary when writing standalone scripts and command line tools which do not use these classes.

...

The conditions system is initialized using the ConditionsManager's setDetector method which takes the name of a detector and a run number.
Code Block
languagejava
themeMidnight
DatabaseConditionsManager.getInstance().setDetector("RealDetectorNameHeredetector_name", 12345772);

HPS adds several features to the lcsim conditions system.

...