Skip to content

Commit 23e191d

Browse files
authored
Merge pull request #228 from oliviermattelaer/patch-1
Fix parsing issue for LHE reader
2 parents 36e391a + 7887c2b commit 23e191d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/SampleAnalyzer/Process/Reader/LHEReader.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ MAbool LHEReader::ReadHeader(SampleFormat& mySample)
133133
tag_simplified_pythia=true;
134134
if ( (line.find("<MA5Format> Simplified LHE format </MA5Format>")!=std::string::npos) )
135135
tag_simplified_ma5=true;
136-
EndOfLoop = (line.find("<event>")!=std::string::npos);
136+
EndOfLoop = (line.find("<event")!=std::string::npos);
137137
}
138138
while(!EndOfLoop);
139139

@@ -224,7 +224,7 @@ StatusCode::Type LHEReader::ReadEvent(EventFormat& myEvent, SampleFormat& mySamp
224224
// Read the line
225225
if (!firstevent_ && !ReadLine(line)) return StatusCode::FAILURE;
226226
// Detect tags
227-
if (line.find("<event>")!=std::string::npos || firstevent_)
227+
if (line.find("<event")!=std::string::npos || firstevent_)
228228
{
229229
event_block=true;
230230
event_header=true;
@@ -288,7 +288,7 @@ StatusCode::Type LHEReader::ReadEvent(EventFormat& myEvent, SampleFormat& mySamp
288288
do
289289
{
290290
if (!ReadLine(line)) return StatusCode::FAILURE;
291-
EndOfLoop = (line.find("<event>")!=std::string::npos);
291+
EndOfLoop = (line.find("<event")!=std::string::npos);
292292
}
293293
while(!EndOfLoop);
294294
}

0 commit comments

Comments
 (0)