117# there shouldn't be a <event> markup in the middle of the event record; if yes, we shouldn't keep the event
118if 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
121
122# The first line is the info block.
123ifnot info:
124 info = EventInfo.from_string(datum)
125if info.invalid:
126 LHEToolsLog.warning("Could not retrieve EventInfo from input lhe file")
127continue
128
129# The lines [1, N_PARTICLE] define particles.
130if 1 <= i <= info.nparticles:
131 p = Particle.from_string(datum)
132if p.invalid:
133 LHEToolsLog.warning("Could not retrieve Particle from input lhe file")
134 particles.append(p)
135continue
136
137# All subsequent lines are additional configuration which is