lhef
A library for interacting with files in the Les Houches Event File (LHEF) format.
Currently, lhef only supports reading via the Reader
struct. Information about the generator run is provided in a HEPRUP
object and each event is stored in a HEPEUP object. These structs
correspond to the Fortan common blocks of the same names in the original proposal, but
contain extra info fields corresponding to the "optional information"
specified in the LHEF standard.
As of now, only version 1.0 of
the LHEF format is fully supported. Files in version 2.0
and 3.0 are
parsed exactly like for version 1.0. This means that the additional XML
tags have to be extracted manually from the info fields of the
HEPRUP and HEPEUP objects.
Usage
Add this to your Cargo.toml:
[]
= "0.1.0"
and this to your crate root:
extern crate lhef;
Examples
extern crate lhef;
use Reader;
use File;
use BufReader;
let input = new;
let mut reader = new?;
println!;
println!;
let event = reader.event?;
if let Some = event
Notes on (non-)compliance
- The LHEF standard mandates at least one event in each file. This is not enforced.
- Contrary to the standard, attributes in the
<init>,<event>, and<header>tags are not allowed.