Search/Navigation:
Related:
SLAC/EPP
/HPS Public
Jefferson Lab/Hall B
/HPS Run Wiki
S30XL-LESA/LDMX
Table of Contents |
---|
The conditions CommandLineTool can be run using the java command after Installing HPS Java.
Code Block | ||||
---|---|---|---|---|
| ||||
java -cp ./distribution/target/hps-distribution-3.7-SNAPSHOT-bin.jar org.hps.conditions.cli.CommandLineTool |
...
Code Block | ||||
---|---|---|---|---|
| ||||
./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.
...
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, as in this example.:
Code Block | ||||
---|---|---|---|---|
| ||||
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).
The run-summary command can print out conditions collections that will be used for a given run.
...
Code Block | ||||
---|---|---|---|---|
| ||||
conditions-cli.sh tag -p myconnection.prop -d HPS-dummy-detector -r 1234 run-summary |
...
The load command is used to insert new conditions collections into the database, without associating it with a run number (which is done using the add command).
Short Option | Long Option | Description | |||
---|---|---|---|---|---|
- | ah | -- | allhelp | help and exit | |
-f | --file | CSV data to load (see below for format description) | |||
-t | --table | target table in the conditions database | |||
-d | --description | description in the log of this collection (can be left blank) | -h | --help | print help and exit |
Here is an example of using the load command.
...
The add command is used to associate an existing conditions collection with a range of run numbers via its collection ID.
Short Option | Long Option | Description |
---|---|---|
-c | --collection | collection ID of the data |
-r | --run-start | starting run number |
-e | --run-end | ending run number defaults to run start if not provided |
-m | --notes | provide notes about this conditions set |
-t | --table | name of conditions table in database |
-u | --user | your user name (computer account name is fine) |
-h | --help | print help and exit |
Here is an example of using the add command.
Code Block | ||||
---|---|---|---|---|
| ||||
conditions-cli.sh add -c 1234 -s 5000 -e 5001 -m "ECal calibrations for 5000 and 5001" -t ecal_calibrations -u jeremym |
...