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[, lheformat])

Write the LHE file as LHE.

tolhe(lheformat)

Return the LHE file as a string.

write(output_stream, lheformat)

Write the LHE file to an output stream as LHE XML.

Attributes

init

Init block

events

Event block

header

Header block

comment

Comment block

version

Version of the LHE file.

extra_attributes

Attributes of the root LesHouchesEvents element

attributes

Return all the attributes of the root LesHouchesEvents element, including the version.

alias of LesHouchesEvents