-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Thread safe CaloTPGTranscoder #6097
Thread safe CaloTPGTranscoder #6097
Conversation
The CaloTPGTranscoder implementation needs access to data in two different Records. To make that possible, CaloTPGRecord is now dependent upon those Records. This also means we must link with the packages which hold those Records.
Removed the setup and releaseSetup methods since they were implicitly requiring a state change on a const object. Also no returns boost::shared_ptr to const objects.
The base class CaloTPGTranscoder's interface was changed to be thread safe. This means users of CaloTPGTrancoder no longer call setup. Therefore CaloTPGTranscoderULUT was changed so that the creator of the object must call setup and pass it the data which was formerly gotten out of the EventSetup by CaloTPGTranscoderULUT itself. All values are calculated up front to avoid lazy evaluation. This change makes the class thread safe.
The CaloTPGTranscoderULUT class now requires its creator to read from the EventSetup data needed by the class to finish its initialization. Since ESSources are not allowed to read from the EventSetup, this mandated that CaloTPGTranscoderULUTs become an ESProducer.
The CaloTPGTranscoder no longer requires code using the class to call setup and releaseSetup. Now the class is always properly initialized at the time the data is requested.
A new Pull Request was created by @Dr15Jones (Chris Jones) for CMSSW_7_3_X. Thread safe CaloTPGTranscoder It involves the following packages: CalibCalorimetry/CaloTPG @apfeiffer1, @diguida, @cerminar, @cmsbuild, @nclopezo, @rcastello, @ggovi, @mmusich, @mulhearn can you please review it and eventually sign? Thanks. |
+1 On Wed, Oct 29, 2014 at 11:42 PM, cmsbuild notifications@github.com wrote:
Thanks, |
+1 |
+1 |
This pull request is fully signed and it will be integrated in one of the next CMSSW_7_3_X IBs unless changes (tests are also fine). This pull request will be automatically merged. |
Thread safe CaloTPGTranscoder
CaloTPGTranscoder is one of the last (if not the last) EventSetup product to be thread-unsafe.
These commits change the way that class is handles so that it gets fully initialized in its ESProducer and therefore later clients do not need to cause it to be updated.