Versions Compared

Key

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

It is assumed in the instructions below that hps-distribution-bin.jar refers to a local copy of the HPS Java distribution from the target dir with an actual version.  

For instance, after building HPS Java, the distribution jar for the copy of HPS Java I am using can be found here.

Code Block
languagebash
cd hps-java-trunk; ls distribution/target/hps-distribution-3.6-SNAPSHOT-bin.jar

Actual version numbers are left out for brevity.

This jar file contains all of the project's dependencies in a distribution that can be run standalone using the java command.

Running the Jar File

Assuming you have followed the instructions at Installing HPS Java, you can run the standalone jar file two ways.

...

Code Block
languagebash
java -jar ./distribution/target/hps-distribution-3.6-SNAPSHOT-bin.jar [args]

Without any arguments it will print the command line options and then exit.

You can also run the main method from any class in the jar.

Code Block
languagebash
java -cp ./distribution/target/hps-distribution-bin.jar org.hps.evio.EvioToLcio [args]

Some XML steering files have variables that need to be resolved with command line arguments.

For instance, suppose the XML file has this variable definition.

Code Block
languagexml
<driver name="MyDriver" type="org.example.MyDriver">
    <someNumber>${numVar}</someNumber>
</driver>

The var would need to be resolved with a command like this.

Code Block
languagebash
 java -cp ./distribution/target/hps-distribution-bin.jar org.hps.evio.EvioToLcio -DnumVar=1234 [...]

All variables defined in the XML files must be resolved from the command line or an error will occur.

System Properties

The command line tools are affected by different environment settings which are set through Java system properties.

This is a table of the system properties that can affect HPS Java.

NameDescriptionValues
java.util.logging.config.fileJava logging config filedefined in logging package doc
java.util.logging.config.classJava logging config classdefined in logging package doc
hep.aida.IAnalysisFactoryAIDA backend factory class
  • hep.aida.ref.AnalysisFactory - default
  • hep.aida.jfree.AnalysisFactory - JFree backend
  • hep.aida.ref.BatchAnalysisFactory - batch mode (no plot display)
disableSvtAlignmentConstantsDisables reading of SVT alignment constants from conditions dbtrue
org.hps.conditions.connection.fileProperties file with connection settings for conditions database 
org.hps.conditions.connection.resourceResource that points to properties file with connection settings for conditions database
  • /org/hps/conditions/config/jlab_connection.prop - default connection

These values are set as system properties in Java itself.

Code Block
languagebash
java -DdisableSvtAlignmentConstants=true [...]

 

Job Manager

EvioToLcio

Run Scripts

Using your own steering file

...

The standard steering files are in trunk/steering-files/src/main/resources/org/hps/steering/.

...

Logging and Debugging

Logger

Every package in hps-java does have a default level which comes from:
trunk/logging/src/main/resources/org/hps/logging/config/logging.properties
provided you set the system property as I described or use one of the wrapper scripts from distribution.
Or you can override the default levels by providing your own custom config using
java -D -Djava.util.logging.config.file=mylogging.properties
There you can set the log level of all the packages in your custom config.

...