-
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
Added protection from multiple creation of geometry #38640
Conversation
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-38640/30928
|
A new Pull Request was created by @civanch (Vladimir Ivantchenko) for master. It involves the following packages:
@malbouis, @yuanchao, @cmsbuild, @francescobrivio, @ChrisMisan, @tvami can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test |
assign trk-dpg |
-1
|
@cmsbuild , please abort |
-1
|
I mean the change per se is OK, though I would prefer to push it together with some other clean-up later (once the main issue is solved) |
type bug-fix |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ff942f/26079/summary.html Comparison SummarySummary:
|
+1
|
+alca |
+reconstruction |
@@ -73,6 +74,8 @@ namespace magneticfield { | |||
edm::ESGetToken<MagFieldConfig, IdealMagneticFieldRecord> chosenConfigToken_; | |||
|
|||
edm::ESGetToken<FileBlob, MFGeometryFileRcd> mayConsumeBlobToken_; | |||
cms::DDDetector* detector_{nullptr}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cms::DDDetector* detector_{nullptr}; | |
std::unique_ptr<cms::DDDetector> detector_{nullptr}; |
unique_ptr
is preferred over a bare pointer. Then the delete
in the destructor is not needed.
@cms-sw/orp-l2 can we merge this for 1100 IB? |
FYI: CMSSW_12_4_2-was cut two days ago, see e.g. https://cms-talk.web.cern.ch/t/production-release-cmssw-12-4-2-now-available/12579 |
yes, too many versions, I meant 12_4_3 or 12_4_2_patch1 |
Anyway @perrotta do didnt seem to address my comments. What's the plan given that the PR is fully signed? |
The plan must take into account that today is Saturday, ICHEP is ongoing, and we already rushed to create quite a few releases in the past days. |
+1
|
Thanks Andrea for merging this (on a Sat and during ICHEP ) -- much appreciated! |
@@ -187,9 +194,10 @@ std::unique_ptr<MagneticField> DD4hep_VolumeBasedMagneticFieldESProducerFromDB:: | |||
"<MaterialSection label=\"materials.xml\"><ElementaryMaterial name=\"materials:Vacuum\" density=\"1e-13*mg/cm3\" " | |||
"symbol=\" \" atomicWeight=\"1*g/mole\" atomicNumber=\"1\"/></MaterialSection>"); | |||
|
|||
auto ddet = make_unique<cms::DDDetector>("cmsMagneticField:MAGF", sblob, true); | |||
if (nullptr == detector_) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This simple test seems like a bad idea. We also need to be sure this is the correct geometry to use as well.
PR description:
There are the crash discussed in #38624, which happens for alca run. The problem happens because in this run geometry was created twice. The fix is done in two places:
PR validation:
If this PR is a backport please specify the original PR and why you need to backport that PR. If this PR will be backported please specify to which release cycle the backport is meant for:
should be also in 12_3 and 12_4