Search/Navigation:
Related:
SLAC/EPP
/HPS Public
Jefferson Lab/Hall B
/HPS Run Wiki
S30XL-LESA/LDMX
The tool can be run using the java command after Installing HPS Java.
java -cp ./distribution/target/hps-distribution-3.7-SNAPSHOT-bin.jar org.hps.conditions.cli.CommandLineTool
The automatically generated run script can also be used.
./distribution/target/appassembler/bin/conditions-cli.sh
Without any arguments these commands will print the command usage.
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 interface has sub-commands.
Short Option | Long Option | Description |
---|---|---|
-d | --detector | name of HPS Java detector to initialize |
-r | --run | run number for initialization (with detector) |
-t | --tag | conditions tag for record filtering |
-x | --xml | conditions XML config file (experts only) |
-h | --help | print 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.
./distribution/target/appassembler/bin/conditions-cli.sh tag -p myconnection.prop -d HPS-dummy-detector -r 1234 [subcommand]
Options after the sub-command are passed to that sub-commands parser and not processed as general options (similar to how the svn command works).
The tag command is used to make a conditions tag that can be used to filter records.
Short Option | Long Option | Description |
---|---|---|
-d | don't prompt before making tag (careful!) | |
-t | --tag | name of tag |
-s | --run-start | start run number |
-e | --run-end | end run number |
-m | --multiple | action for disambiguation of multiple valid records of the same type in the run |
-h | --help | print help and exit |
Here is a dummy example of using the tag command.
./distribution/target/appassembler/bin/conditions-cli.sh tag -s 42 -e 1001 -m LAST_CREATED -t test-tag-1
Tagging requires write access to the database so a connection properties file must be provided to override the default read-only connection.
The run-summary command can print out conditions collections that will be used for a given run.
Short Option | Long Option | Description |
---|---|---|
-a | --all | print out collection records and not just summary information |
-h | --help | print help and exit |
To use this, command the -d and -r base options should be used to initialize the conditions system.
./distribution/target/appassembler/bin/conditions-cli.sh tag -p myconnection.prop -d HPS-dummy-detector -r 1234 run-summary
If this information is not provided then an error will occur.