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
Made FFTJetCorrector thread safe #7682
Made FFTJetCorrector thread safe #7682
Conversation
The FFTJetCorrector is accessible via the EventSetup and therefore all its const methods must be thread safe. Previously, the const method 'correct' was using a member data for a temporary buffer which was being changes on each call to 'correct'. To make the routine thread safe we now use a buffer on the stack if only a small buffer is needed and use a std::vector if a larger buffer is needed. This problem was caught by the static analyzer.
It would be great if someone who knew how the FFTJetCorrectors are initialized could look to see what would be an optimal size for the stack based buffer. |
A new Pull Request was created by @Dr15Jones (Chris Jones) for CMSSW_7_4_X. Made FFTJetCorrector thread safe It involves the following packages: JetMETCorrections/FFTJetModules @cmsbuild, @vadler, @nclopezo, @monttj can you please review it and eventually sign? Thanks. |
please test |
The tests are being triggered in jenkins. |
I am not sure who is using "FFTJetCorrectors"? |
The best way to make code thread safe is to remove it entirely :). |
@davidlange6 @vadler @monttj ping |
Made FFTJetCorrector thread safe
The FFTJetCorrector is accessible via the EventSetup and therefore
all its const methods must be thread safe. Previously, the const
method 'correct' was using a member data for a temporary buffer
which was being changes on each call to 'correct'. To make the
routine thread safe we now use a buffer on the stack if only a small
buffer is needed and use a std::vector if a larger buffer is needed.
This problem was caught by the static analyzer.