pylhe.LHEHeader

class pylhe.LHEHeader(initrwgt: LHEInitRWGT, extra_elements: list[Element] = <factory>, extra_attributes: dict[str, str]=<factory>)[source]

Bases: object

Represents the header block of an LHE file as a dataclass.

__init__(initrwgt: LHEInitRWGT, extra_elements: list[Element] = <factory>, extra_attributes: dict[str, str]=<factory>) None

Methods

__init__(initrwgt, extra_elements, ...)

tolhe()

Return the header block as a string in LHE format.

Attributes

attributes

Return all the attributes of the header element

initrwgt

<initrwgt> block information

extra_elements

Other XML elements stored directly inside the header block

extra_attributes

Attributes of the header element not represented by dedicated fields

property attributes: dict[str, str]

Return all the attributes of the header element

extra_attributes: dict[str, str]

Attributes of the header element not represented by dedicated fields

extra_elements: list[Element]

Other XML elements stored directly inside the header block

initrwgt: LHEInitRWGT

<initrwgt> block information

tolhe() str[source]

Return the header block as a string in LHE format.