113 spurious_event_markup =
False
114 event_markup = re.compile(
'<event>')
116 for i, datum
in enumerate(lines):
118 if event_markup.match(datum):
119 LHEToolsLog.warning(
"Spurious <event> markup was found in the middle of an event record. Probably the result of one event being incompletely written.")
120 spurious_event_markup =
True
124 info = EventInfo.from_string(datum)
126 LHEToolsLog.warning(
"Could not retrieve EventInfo from input lhe file")
130 if 1 <= i <= info.nparticles:
131 p = Particle.from_string(datum)
133 LHEToolsLog.warning(
"Could not retrieve Particle from input lhe file")
139 extra_lines.append(datum)
141 return cls(info=info,
143 extra_lines=extra_lines,
144 spurious_event_markup=spurious_event_markup)