New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow for more than 3 skipped LHE files. #7642
Conversation
Currently, the LHESource reads by calling nextEvent(), which in turn calls LHEReader::next(). The latter method returns an empty reference at the end of a file [1]. When reading an event in a fourth file, nextEvent() is first called in the constructor of LHESource [2], returning an empty reference at the end of the fist file. The other calls to nextEvent(), [3] and [4], return an empty reference at the end of the second and third file. But there is a check after [4], and LHESource quits reading files without attempting to open the fourth file. Try to address the situation by keeping reading files as long as new files are opened and empty events are returned. This potentially also removes the need for the check after [4]. Also pertains to dmwm/CRABServer#4659. [1]: http://cmslxr.fnal.gov/lxr/source/GeneratorInterface/LHEInterface/src/LHEReader.cc#0491 [2]: http://cmslxr.fnal.gov/lxr/source/GeneratorInterface/LHEInterface/plugins/LHESource.cc#0042 [3]: http://cmslxr.fnal.gov/lxr/source/GeneratorInterface/LHEInterface/plugins/LHESource.cc?v=CMSSW_7_4_0_pre5#0166 [4]: http://cmslxr.fnal.gov/lxr/source/GeneratorInterface/LHEInterface/plugins/LHESource.cc?v=CMSSW_7_4_0_pre5#0169
A new Pull Request was created by @matz-e (Matthias Wolf) for CMSSW_7_4_X. Allow for more than 3 skipped LHE files. It involves the following packages: GeneratorInterface/LHEInterface @vciulli, @covarell, @thuer, @cmsbuild, @nclopezo, @bendavid can you please review it and eventually sign? Thanks. |
@wmtan since you were the last one to touch this code, can you take a look if this makes sense? |
closing in 74x - there is the same PR open in 75x (now the development release) |
Currently, the LHESource reads by calling nextEvent(), which in turn
calls LHEReader::next(). The latter method returns an empty reference
at the end of a file 1.
When reading an event in a fourth file, nextEvent() is first called in
the constructor of LHESource 2, returning an empty reference at the
end of the fist file. The other calls to nextEvent(), 3 and 4,
return an empty reference at the end of the second and third file.
But there is a check after 4, and LHESource quits reading files
without attempting to open the fourth file.
Try to address the situation by keeping reading files as long as new
files are opened and empty events are returned. This potentially also
removes the need for the check after 4.
Also pertains to dmwm/CRABServer#4659.