Versions Compared

Key

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

...

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

select

The select command extracts collections from an LCIO file and writes them out to a new file. Selection is performed either by a regular expression match on the collection name or by the type of objects in the collection.

The type is compared to the value of LCCollection.getTypeName() for each collection.

The patterns should be valid regular expressions, and, to be safe, should include the ^ and $ characters for marking the beginning and end of the expression.

It is possible to give multiple patterns and types. The collection need only match a single pattern or type. When both types and patterns are defined, the collection must match at least one type and one pattern to be included in the output file.

Do not include a pattern when only type selection is required. This will only do type matching and includes all collection names as matches by default.

This command selects all SimCalorimeterHits from an event file.

No Format

lcio select -f events.slcio -o calhits.slcio -t SimCalorimeterHit

This command selects all collections starting with "Hcal".

No Format

lcio select -f events.slcio -o hcal.slcio -i Hcal.*