Versions Compared

Key

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

Table of Contents

Running the Tool

The conditions CommandLineTool can be run using the java command after Installing HPS Java.

Code Block
languagebash
themeMidnight
java -cp ./distribution/target/hps-distribution-3.7-SNAPSHOT-bin.jar org.hps.conditions.cli.CommandLineTool

...

Code Block
languagebash
themeMidnight
./distribution/target/appassembler/bin/conditions-cli.sh

In order to execute commands which update the conditions database, you will need to supply credentials for an account with the appropriate privileges.  This can be done by following the instructions in the conditions documentation.

Without any arguments the commands will print the basic usage information and then exit.

No Format
usage: CommandLineTool
Commands:
tag
run-summary
load
add
print
 -d,--detector <arg>     detector name
 -h,--help               print help
 -p,--connection <arg>   database connection properties file
 -r,--run <arg>          run number
 -t,--tag <arg>          conditions tag to use for filtering records
 -x,--xml <arg>          conditions XML configuration file

Much like the svn or cvs commands, this git command, the conditions command line interface has sub-commands with their own command switches.

...

General Options Table

Short OptionLong OptionDescription
-d--detectorname of HPS Java detector to initialize
-r--runrun number for initialization (with detector)
-t--tagconditions tag for record filtering-x--xmlconditions XML config file (experts only)
-h--helpprint help and exit-p--connection

connection properties file

must be provided to override the default read-only connection if you want to update the database

These options should be provided before the sub-command, as in this example.:

Code Block
languagebash
themeMidnight
conditions-cli.sh tag -p myconnection.prop -d HPS-dummy-detector -r 1234 [subcommand]

...

Tagging requires write access to the database so a connection properties file must be provided to override the default read-only connection (see the documentation on the conditions system for details).

Run Summary Command

The run-summary command can print out conditions collections that will be used for a given run.

...

Code Block
languagebash
themeMidnight
conditions-cli.sh tag -p myconnection.prop -d HPS-dummy-detector -r 1234 run-summary

...