You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Running the Tool

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.

Basic 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--xml

conditions 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.

./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).

Commands

Tag Command

The tag command is used to make a conditions tag that can be used to filter records.

Tag Command Options Table

Short OptionLong OptionDescription
-d don't prompt before making tag (careful!)
-t--tagname of tag
-s--run-startstart run number
-e--run-endend run number
-m--multipleaction for disambiguation of multiple valid records of the same type in the run
-h--helpprint 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.

Run Summary Command

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

Short OptionLong OptionDescription
-a --allprint out collection records and not just summary information
-h--helpprint 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.

Load Command

 

Add Command

 

Print Command

  • No labels