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

Compare with Current View Page History

« Previous Version 5 Next »

LCIO Command Line Tool

Overview

The LCIO command line tool provides a number of useful utilities from the command line.

The command line tool is launched with the script ./bin/lcio from the LCIO base directory.

$LCIO/bin/lcio [command] [arguments]

The script is runnable from anyplace on the host system and will setup the Java CLASSPATH before executing the main method of the class hep.lcio.util.CommandLineTool.

With no arguments, the usage statement is printed.

usage: LcioCommandLineTool
Commands:
compare
concat
validate
siodump
print
stdhep
split
random
count
merge
 -h    Print lcio command-line tool usage.
 -v    Set the verbosity.

Similar to the cvs command, the LCIO command line tool takes the name of command as its first argument. The command should be one of the following.

  • compare - Perform a diff on two LCIO files, reporting the differences.
  • concat - Concatenate two or more LCIO files together.
  • validate - Perform some very simple validation of an LCIO file.
  • siodump - Print low-level LCIO information using the SIO interface.
  • print - Format and print all the collections and metadata of an LCEvent.
  • stdhep - Convert StdHep events into LCIO MCParticle collection.
  • split - Split an LCIO file into smaller chunks.
  • random - Generate a random LCIO event. (e.g. for testing purposes)
  • count - Count event and run headers of 1 or more LCIO files and report statistics.
  • merge - Merge 2 or more LCIO files together.

compare

The compare command takes 2 or more input LCIO files and compares them to find differences.

usage: compare
 -f    Add a file to compare (Must have at least 2).
 -n    Set number of events to compare.
 -s    Set number of events to skip.
 -v    Set verbosity level (must be between 1 and 4).

For instance, this command will compare the second events of files file1 and file2, with high verbosity.

lcio compare -f file1.slcio -f file2.slcio -n 1 -s 1 -v 4

Extra arguments will be interpretted as additional input files, so the above could be written this way instead.

lcio compare -n 1 -s 1 -v 4 file1.slcio file2.slcio

The comparison is quite detailed, so LCIO files will not be considered identical unless they are basically exact copies of each other.

  • No labels