Versions Compared

Key

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

...

Specific command line syntax is not standardized and will depend on what was implemented in that class by the author.

Steering Files

Steering File

...

Locations

The standard location for steering files is steering-files/src/main/resources/org/hps/steering/ in HPS Java.

...

The JVM accepts a number of command line arguments that alter its behavior.

In particular, when running java you will likely want to increase the default heap space, as the default is too low for running HPS Java's full reconstruction.

Code Block
languagebash
java -Xmx2g [...]

...

Code Block
languagebash
java -server [...]

The server VM JVM has been optimized for peak operating speed rather than responsivenessperformance speed and should run faster than the default client JVM.

Command Line Tools

Job Manager

The JobManager runs a series of Drivers defined in an lcsim xml file on input events from one or more LCIO files.  The XML steering file may contain lists of input file tags, or they may be (more typically) supplied with command line arguments.  The job manager's class is listed in the distribution jar's manifest file, making it the default program which will run when using the java -jar switch.

The job manager has the following command line arguments.

 command on the distribution.

Job Manager Command Line Usage

No Format
No Format
[1026 $] java -jar ./hps-java-trunk/distribution/target/hps-distribution-3.6-SNAPSHOT-bin.jar
Feb 18, 2016 4:02:27 PM org.lcsim.job.JobControlManager printHelp
INFO: java org.lcsim.job.JobControlManager [options] steeringFile.xml
usage:
 -b,--batch               Run in batch mode in which plots will not be
                          shown.
 -D,--define <arg>        Define a variable with form [name]=[value]
 -d,--detector <arg>      user supplied detector name (careful!)
 -e,--event-print <arg>   Event print interval
 -h,--help                Print help and exit
 -i,--input-file <arg>    Add an LCIO input file to process
 -n,--nevents <arg>       Set the max number of events to process
 -p,--properties <arg>    Load a properties file containing variable
                          definitions
 -r,--resource            Use a steering resource rather than a file
 -R,--run <arg>           user supplied run number (careful!)
 -s,--skip <arg>          Set the number of events to skip
 -w,--rewrite <arg>       Rewrite the XML file with variables resolved
 -x,--dry-run             Perform a dry run which does not process events

...

Job Manager Command Line Options Table

SwitchDescriptionNotes
-bActivates batch mode plotting so plots will not be shown when running job. This switch can be used to suppress plot display even if an AIDA plotter's show method is called from a driver.
-DAdd a variable definition that applies to the input steering file. All variables in the XML input file must be resolved using this switch or an error will occur.
-dSet the name of the detector model. This should be a valid detector model defined in detector-data/detectors of HPS Java.
-ePrint out an informational message every N events. Replaces EventMarkerDriver. When left out no information is printed about event numbers during the job.
-hPrint help and exit. Using this with other arguments will still cause immediate help print and exit.
-iAdd an LCIO input file. This switch can be used multiple times.
-nMaximum number of events to run in job. Leave this unset to run all events in the input files; internally -1 is used to indicate unlimited events.
-pLoad a properties file containing steering file variable definitions. 
-rTreat the supplied steering as a classpath resource rather than a file. 
The input properties file should define name: value for each variable that needs to be defined.
-rTreat the supplied steering as a classpath resource rather than a file.These are typically resources from org/hps/steering in the steering-files module of HPS Java.
-RSet the run number to be used when initializing the conditions system. This has the side effect of "freezing" the conditions system, as the run numbers from the input events will be ignored.
-sSkip N events at the beginning of the job. 
-wRewrite the XML steering file with the variables resolved. resolved.This can be used as a simple template engine or for saving the values that were used for a job.
-xExecute in dry run mode which means actual job will not execute.Can be used to check for initialization errors.

...

Here is an example using many of these command line arguments together.  (This specific command will not work!)

Code Block
languagebash
java -jar ./hps-java-trunk/distribution/target/hps-distribution-bin.jar -b -DoutputFile=output -d HPS-EngRun2015-Nominal-v3 -e 100 -i input.slcio \
-n 1000 -p myvars.prop -r -R 5772 -s 10 -w myjob.xml -x /org/hps/steering/dummy.lcsim

This will not actually work (just provided to show all command line options at once).

If a detector name and run number are both supplied as arguments from the command line, the conditions system will be initialized and frozen, meaning that subsequent event numbers from data will be ignored.

...

The EvioToLcio tool converts EVIO files to LCIO events and optionally can run a steering file job on the converted in-memory events.  This allows the conversion and reconstruction to run in the same job/process for efficiency.

EvioToLcio Command Line Usage

 This tool has the following options.

No Format
[1037 $] java -cp ./distribution/target/hps-distribution-3.6-SNAPSHOT-bin.jar org.hps.evio.EvioToLcio
EvioToLcio [options] [evioFiles]
usage:
 -b         enable headless mode in which plots will not show
 -d <arg>   detector name (required)
 -D <arg>   define a steering file variable with format -Dname=value
 -f <arg>   text file containing a list of EVIO files
 -h         print help and exit
 -L <arg>   log level (INFO, FINE, etc.)
 -l <arg>   path of output LCIO file
 -m <arg>   set the max event buffer size
 -M         use memory mapping instead of sequential reading
 -n <arg>   maximum number of events to process in the job
 -r         interpret steering from -x argument as a resource instead of a
            file
 -R <arg>   fixed run number which will override run numbers of input
            files
 -t <arg>   specify a conditions tag to use
 -v         print EVIO XML for each event
 -x <arg>   LCSim steeering file for processing the LCIO events

...

 

EvioToLcio Command Line Options Table

SwitchDescriptionNotes
-bActivates batch mode plotting so plots will not be shown when running job. 
-dSet the name of the detector model. 
-DAdd a variable definition that applies to the input steering file. 
-fText file containing list of input EVIO files. 
-LSet log level.

DEPRECATED

Use logging config file or class instead.

-lPath of output LCIO file. 
-mSet the max event buffer size.Experts only.
-MUse memory mapping in EVIO reader instead of sequential access.Experts only.
-nMaximum number of events to process in the job. 
-RSet the run number to be used when initializing the conditions system. 
-tSpecify a conditions tag for filtering conditions records. 
-vPrint out EVIO converted to XML for every event.For verbose debugging of events.
-rInterpret steering file from -x as a classpath resource rather than a file. 
-xSteering fileCould be resource or file depending on if -r switch is used.

...

These are the available log levels, in descending order.

Log Levels Table

LevelDescriptionUse
SEVEREsevere error message usually meaning program should haltunrecoverable errors that halt the program
WARNINGwarning message indicating a non-fatal error or problemwarning messages
INFOinformational messagesinformational messages that should usually print when the program runs
CONFIGconfiguration messagesprinting out config information for a class or tool
FINEdebug print outshigh level debugging messages that should not typically be active
FINERmore verbose debug print outsmore verbose debugging messages
FINESTmost verbose debug messagesthe most verbose debugging messages
ALLprint all error messageswhen logger should always print all messages
OFFdisable all messageswhen logger should be completely disabled from printing

...