showerpipe.lhe.LheData.repeat(repeats: int, inplace: bool = False) bytes | None[source]

Modifies LHE content, repeating each event the number of times given by repeats.

Parameters:
repeats : int

The number of times to repeat the events.

inplace : bool

If True, modifies content inplace and returns None.

Returns:

content – Bytestring representation of the LHE file.

Return type:

bytes

Notes

Repeat means, eg. repeat([A, B, C], 2) => [A, A, B, B, C, C]

Modifying inplace is more computationally efficient than setting the content explicitly to bytestring output, but may lead to unexpected side effects. Should be used with caution.


Last update: Jun 27, 2025