|
[Rivet-svn] r3170 - trunk/pyextblackhole at projects.hepforge.org blackhole at projects.hepforge.orgThu Jun 30 15:55:25 BST 2011
Author: hoeth Date: Thu Jun 30 15:55:25 2011 New Revision: 3170 Log: Fix #456 (histogram paths ignored when reading in a flat file) Modified: trunk/pyext/lighthisto.py Modified: trunk/pyext/lighthisto.py ============================================================================== --- trunk/pyext/lighthisto.py Wed Jun 29 18:11:25 2011 (r3169) +++ trunk/pyext/lighthisto.py Thu Jun 30 15:55:25 2011 (r3170) @@ -357,18 +357,20 @@ new = cls() for line in stringbuf.splitlines(): line = line.strip() - if not line or line.startswith("#"): + if not line: continue if 'BEGIN HISTOGRAM' in line: fullpath = line.split('BEGIN HISTOGRAM', 1)[1].strip() new.path = os.path.dirname(fullpath) new.name = os.path.basename(fullpath) continue + elif 'END HISTOGRAM' in line: + break + elif line.startswith("#"): + continue elif "=" in line: linearray = line.split("=", 1) desc[linearray[0]] = linearray[1] - elif 'END HISTOGRAM' in line: - break else: linearray = line.split() if len(linearray) == 4:
More information about the Rivet-svn mailing list |