Versions Compared

Key

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

...

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.

Code Block
languagejava
themeMidnight
new DatabaseConditionsManager();

This will automatically install the manager as the global conditions manager, which can then global instance of the conditions manager can be accessed using the following method.command:

Code Block
languagejava
themeMidnight
final DatabaseConditionsManager mgr = DatabaseConditionsManager.getInstance();

If an instance has not already been instantiated, one will be created.

Users should not normally need to install their own conditions manager as this is typically done for them 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("detector_name", 5772);

In some special cases, the conditions system may need to be completely reset by creating and installing a new instance of the manager.

This can be done by calling a special method on the manager.

Code Block
titleResetting the Conditions Manager
DatabaseConditionsManager.reset();

You should absolutely not do this under normal circumstances such as within your Driver code.  The method is public only so that this can be done if necessary. 

Additional HPS Features

HPS adds several features to the lcsim conditions system.

...