1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//! Generic event file reader.
//!
//! This crate provides the [EventFileReader] struct for reading
//! scattering event files in different formats. See the [Features
//! section](#features) for a list of supported formats and the [avery
//! crate](https://docs.rs/avery/latest/avery/event/struct.Event.html)
//! for the format of the returned events.
//!
//! # Example
//!
//! ```no_run
//!# fn main() -> Result<(), Box<dyn std::error::Error>> {
//! use event_file_reader::EventFileReader as Reader;
//!
//! let reader = Reader::new("events.lhe.gz")?;
//! for event in reader {
//! let event = event?;
//! // do something with the event
//! }
//!# Ok(())
//!# }
//! ```
//!
//! # Features
//!
//! ## Default Features
//!
//! - `lhef`: Support for event files in the [Les Houches Event File format](https://crates.io/crates/lhef).
//! - `hepmc2`: Support for event files in the [HepMC 2 format](https://crates.io/crates/hepmc2).
//! - `flate2`: Support for DEFLATE compressed event files, e.g. gzip.
//! - `zstd`: Support for event files compressed with [zstd](https://en.wikipedia.org/wiki/Zstd).
//!
//! ## Non-default Features
//!
//! - `all`: Enable all mutually compatible features. Use `--features all` instead of `--all-features`.
//! - `bzip2`: Support for [bzip2](https://en.wikipedia.org/wiki/Bzip2) compressed event files.
//! - `ntuple`: Support for [ntuple event files](https://crates.io/crates/ntuple).
//! - `lz4`: Support for [lz4](https://en.wikipedia.org/wiki/LZ4_(compression_algorithm)) compressed event files using the [lz4 crate](https://crates.io/crates/lz4). Incompatible with the `lz4_flex` feature.
//! - `lz4_flex`: Support for [lz4](https://en.wikipedia.org/wiki/LZ4_(compression_algorithm)) compressed event files using the [lz4_flex crate](https://crates.io/crates/lz4_flex). Incompatible with the `lz4` feature.
//!
pub use EventFileReader;