pylhe.LHEFile

pylhe.LHEFile

Methods

__init__(init[, events, header, comment, ...])

count_events(filepath)

Efficiently count the number of events in an LHE file without loading them into memory.

frombuffer(fileobject[, with_attributes, ...])

Read an LHE file and return an LHEFile object.

fromfile(filepath[, with_attributes, generator])

Read an LHE file and return an LHEFile object.

fromstring(string[, with_attributes, generator])

Create an LHEFile instance from a string in LHE format.

tofile(filepath[, gz, rwgt, weights])

Write the LHE file.

tolhe([rwgt, weights])

Return the LHE file as a string.

write(output_stream[, rwgt, weights])

Write the LHE file to an output stream.

Attributes

attributes

Attributes of the root LesHouchesEvents element

comment

Comment block

events

Event block

header

Header block

version

Version of the LHE file, retrieved from the root element attribute.

init

Init block

alias of LesHouchesEvents