Skip to content
Snippets Groups Projects
Commit 69a4dd82 authored by Timothee Theveneaux-Pelzer's avatar Timothee Theveneaux-Pelzer :vulcan:
Browse files

Adding print of number of lhe events if the TXT is saved, in normal evgen mode

parent 2407490e
No related branches found
No related tags found
No related merge requests found
......@@ -746,6 +746,13 @@ def _checkattr(attr, required=False):
raise RuntimeError("Required " + msg)
return False
return True
if hasattr(runArgs, "outputTXTFile"):
# counting the number of events in LHE output
with open(eventsFile) as f:
contents = f.read()
count_ev = contents.count("<event>")
print "MetaData: %s = %s" % ("Number of produced LHE events ", count_ev)
if _checkattr("description", required=True):
msg = evgenConfig.description
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment