|
[Rivet-svn] rivet: 5 new changesetsRivet Mercurial rivet at projects.hepforge.orgWed Dec 13 17:00:01 GMT 2017
details: https://rivet.hepforge.org/hg/rivet/rev/8155d458fdba branches: changeset: 6171:8155d458fdba user: Andy Buckley <andy at insectnation.org> date: Tue Dec 12 09:35:14 2017 +0000 description: Comment details: https://rivet.hepforge.org/hg/rivet/rev/fe47121f77ec branches: changeset: 6172:fe47121f77ec user: Andy Buckley <andy at insectnation.org> date: Tue Dec 12 22:30:03 2017 +0000 description: Note DISLepton todos details: https://rivet.hepforge.org/hg/rivet/rev/796331c99cb8 branches: changeset: 6173:796331c99cb8 user: Andy Buckley <andy at insectnation.org> date: Wed Dec 13 16:50:13 2017 +0000 description: Trying to handle requests for a non-existent file... better, but not perfect details: https://rivet.hepforge.org/hg/rivet/rev/a2a0dfd882bd branches: changeset: 6174:a2a0dfd882bd user: Andy Buckley <andy at insectnation.org> date: Wed Dec 13 16:54:04 2017 +0000 description: Complete missing-file protection fix details: https://rivet.hepforge.org/hg/rivet/rev/fe7a5c0052cc branches: changeset: 6175:fe7a5c0052cc user: Andy Buckley <andy at insectnation.org> date: Wed Dec 13 16:54:58 2017 +0000 description: Update ChangeLog: 'Protect Run methods and rivet script against being told to run from a missing or unreadable file.' diffs (truncated from 122 to 50 lines): --- a/ChangeLog Tue Dec 12 12:11:08 2017 +0000 +++ b/ChangeLog Wed Dec 13 16:54:58 2017 +0000 @@ -1,3 +1,7 @@ +2017-12-13 Andy Buckley <andy.buckley at cern.ch> + + * Protect Run methods and rivet script against being told to run from a missing or unreadable file. + 2017-12-11 Andy Buckley <andy.buckley at cern.ch> * Replace manual event count & weight handling with a YODA Counter object. --- a/bin/rivet Tue Dec 12 12:11:08 2017 +0000 +++ b/bin/rivet Wed Dec 13 16:54:58 2017 +0000 @@ -570,7 +570,7 @@ try: if opts.EVENT_TIMEOUT or opts.RUN_TIMEOUT: signal.alarm(min_nonnull(opts.EVENT_TIMEOUT, opts.RUN_TIMEOUT)) - init_ok = run.init(hepmcfile, hepmcfileweight) + init_ok = run.init(hepmcfile, hepmcfileweight) signal.alarm(0) if not init_ok: logging.error("Failed to initialise using event file '%s'... exiting" % hepmcfile) @@ -578,7 +578,9 @@ except TimeoutException as te: logging.error("Timeout in initialisation from event file '%s'... exiting" % hepmcfile) sys.exit(3) - +except: + logging.warning("Could not read from '%s'" % hepmcfile) + sys.exit(3) ## Event loop evtnum = 0 @@ -591,7 +593,11 @@ ## Open next HepMC file (NB. this doesn't apply to the first file: it was already used for the run init) if fileidx > 0: - run.openFile(hepmcfile, hepmcfileweight) + try: + run.openFile(hepmcfile, hepmcfileweight) + except: + logging.warning("Could not read from '%s'" % hepmcfile) + continue if not run.readEvent(): logging.warning("Could not read events from '%s'" % hepmcfile) continue --- a/pyext/rivet/rivet.pxd Tue Dec 12 12:11:08 2017 +0000 +++ b/pyext/rivet/rivet.pxd Wed Dec 13 16:54:58 2017 +0000 @@ -24,12 +24,12 @@ Run(AnalysisHandler) Run& setCrossSection(double) # For chaining?
More information about the Rivet-svn mailing list |