|
[Rivet-svn] rivet: Fix --nskipRivet Mercurial rivet at projects.hepforge.orgWed Jul 20 09:15:02 BST 2016
details: https://rivet.hepforge.org/hg/rivet/rev/68f28245b696 branches: release-2-5-x changeset: 5321:68f28245b696 user: Holger Schulz <holger.schulz at durham.ac.uk> date: Wed Jul 20 09:14:30 2016 +0100 description: Fix --nskip diffs (truncated from 68 to 50 lines): --- a/bin/rivet Tue Jul 19 23:35:08 2016 +0100 +++ b/bin/rivet Wed Jul 20 09:14:30 2016 +0100 @@ -527,10 +527,12 @@ ## Optional event skipping if evtnum <= opts.EVTSKIPNUM: + logging.debug( "Skipping event #%i"%evtnum) + run.skipEvent(); continue ## Only log the event number once we're actually processing - logNEvt(evtnum, starttime, opts.MAXEVTNUM) + logNEvt(evtnum+opts.EVTSKIPNUM, starttime, opts.MAXEVTNUM) ## Process this event processed_ok = run.processEvent() --- a/include/Rivet/Run.hh Tue Jul 19 23:35:08 2016 +0100 +++ b/include/Rivet/Run.hh Wed Jul 20 09:14:30 2016 +0100 @@ -54,6 +54,9 @@ /// Read the next HepMC event bool readEvent(); + + /// Read the next HepMC event only to skip it + bool skipEvent(); /// Handle next event bool processEvent(); --- a/pyext/rivet/core.pyx Tue Jul 19 23:35:08 2016 +0100 +++ b/pyext/rivet/core.pyx Wed Jul 20 09:14:30 2016 +0100 @@ -72,6 +72,9 @@ def readEvent(self): return self._ptr.readEvent() + def skipEvent(self): + return self._ptr.skipEvent() + def processEvent(self): return self._ptr.processEvent() --- a/pyext/rivet/rivet.pxd Tue Jul 19 23:35:08 2016 +0100 +++ b/pyext/rivet/rivet.pxd Wed Jul 20 09:14:30 2016 +0100 @@ -26,6 +26,7 @@ bool init(string, double) # $2=1.0 bool openFile(string, double) # $2=1.0 bool readEvent() + bool skipEvent() bool processEvent() bool finalize()
More information about the Rivet-svn mailing list |