Versions Compared

Key

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

...

Windows users can install the TortoiseSVN tool, but its usage is not covered in these instructions.

The Subversion client is a complex command line tool with many sub-commands and options.  You may want to study detailed documentation such as The SVN Book in order to familiarize yourself with it.

Obtaining the Source Code

First, you are going to want to create some kind of work directory so that everything can be kept organized.

No Format
mkdir /work/hps
cd /work/hps

You will now use the svn command to checkout the trunk, or main development branch, of the HPS Java Project.

No Format
svn checkout svn://svn.freehep.org/hps/java/trunk hps_trunk

This may take awhile as the source code is downloaded from the server.

Building the Project

The Maven tool is used to build all of the modules and produce the jar file used to run command line jobs.

From the hps_trunk directory, you can execute the following command to build the project.

No Format
mvn -DskipTests

Especially the first time this is done, it may take quite a long time to bootstrap Maven.

Running the Distribution Jar

The primary tool produced by the installation is a standalone, runnable jar file that can be used along with XML steering files to run reconstruction jobs.

In order to test the installation, you may execute a command such as the following.

No Format
java -jar ./distribution/target/hps-distribution-*-bin.jar

The Maven tool will also install this file into your local repository.  This is an example of running the bin jar from your local repository.

No Format
java -jar ~/.m2/repository/org/hps/hps-distribution/3.0.3-SNAPSHOT/hps-distribution-3.0.3-SNAPSHOT-bin.jar

The output of these commands will be something like this.

No Format
java -jar lcsim-bin.jar [options] steeringFile.xml
usage:
 -D    Define a variable with form [name]=[value]
 -b    Run in headless mode in which plots will not be shown.
 -i    Add an LCIO input file to process
 -n    Set the max number of events to process
 -p    Load a properties file containing variable definitions
 -q    Turn on quiet mode
 -r    Use a steering resource rather than a file
 -s    Set the number of events to skip
 -v    Turn on verbose mode
 -w    Rewrite the XML file with variables resolved
 -x    Perform a dry run which does not process events

Actually running steering files using this tool is covered elsewhere.

Congratulations!  You now have a working local installation of HPS Java.

Using Distributions Jars from Nexus

As an alternative to the above instructions for building the software locally, you may also simply download and run the distribution jars from a Nexus repository.

This search URL will show all the available versions of the distribution jar that can be downloaded.

Now you can simply click on the "bin jar" link for the distribution version you want to download, save it to your machine, and run it using the previous instructions.