Versions Compared

Key

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

...

If the "-o" argument is omitted, the default output file name of "randomeventsrandom_events" is used.

count

The count command counts the number of event and/or run headers found in the input LCIO files.

...

Extra command line arguments are interpretted as additional LCIO input files.

merge

The merge command overlays events from different LCIO files into one output file. It is a rather complicated command with a lot of possible options.

No Format

usage: LCIO Merge command
merge command
 -i    Set input file list with format:
       [file_name],[n_reads_per_event],[start_time],[delta_time]
       This option is not usable with the -f argument.
 -T    Set the starting time (ns).
 -e    Set number of events to merge in from each input file per merged
       event.  (Default is 1)
 -f    Add an input file.
 -h    Print merge usage.
 -n    Set maximum number of output events.
 -o    Set the output file.
 -t    Set delta time (ns).

In its simplest form, this command accepts a number of input files, reads one event from each input file, and writes the resulting overlayed event into an output file. For instance, to merge together file1.slcio and file2.slcio into file3.slcio, execute this command.

No Format

lcio merge -f file1.slcio -f file2.slcio -o file3.slcio

The more complicated form of this command accepts a list of input files plus parameters associated with each one, including the number of reads to perform per output event, the starting time, and the delta time that is added for each overlay when there are multiple reads of the same file for one output event.

The command above could be replicated as follows if the file flist.txt contains the following lines.

No Format

/path/to/file1.slcio,1,0.0,0.0
/path/to/file2.slcio,1,0.0,0.0

The merge command then references this list.

No Format

lcio merge -i flist.txt

A delta time can be applied for simulating pileup, as in the following. This will pileup 5 events from the same input file, incrementing all times in the data objects by 5 nanoseconds per event.

No Format

/path/to/events.slcio,1,0.0,5.0

Backgrounds can also be overlayed using this command. One event will be read from events.slcio for each merged event, while 5 events will be read from backgrounds.slcio with a 5 nanosecond time increment for each background event.

No Format

/path/to/events.slcio,1,0.0,0.0
/path/to/backgrounds.slcio,5,0.0,5.0

In general, any arguments in the file list will override those from the command line.