-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Migrate away from OwnVector<BaseTrackerRecHit>
#44047
Migrate away from OwnVector<BaseTrackerRecHit>
#44047
Conversation
cms-bot internal usage |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-44047/38986
|
A new Pull Request was created by @wddgit for master. It involves the following packages:
@cmsbuild, @mandrenguyen, @jfernan2 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test FYI @makortel |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ef2f44/37608/summary.html Comparison SummarySummary:
|
+1 |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @sextonkennedy, @antoniovilela, @rappoccio (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
This is part of a campaign to remove code related to OwnVector. This is in preparation for a possible move to RNTuple from TTree as a persistence mechanism. RNTuple does not support OwnVector because it allows polymorphism. Issue #42734 discusses this in more detail.
In this PR,
OwnVector<BaseTrackerRecHit>
is replaced. This is one of the classes on Matti's list in the issue.The dictionaries are transient so there should be no backward compatibility issues. The
OwnVector<BaseTrackerRecHit>
is converted tostd::vector<std::unique_ptr<BaseTrackerRecHit>>
in the places where it appears.The output and behavior of the code should be the same as before. The EDProducer that produces this also makes another product. That product has pointers to the objects in product with the OwnVector. Nothing else uses it. The only purpose of putting the product in the event is to keep the object alive so those pointers continue to work. Nothing directly consumes it.
PR validation:
Several tests in runTheMatrix.py execute the affected code and those tests pass. For example, test 25.0 step 3 executes it. As a temporary test, I commented out the line putting the product in the event. When that is done, there is a seg fault when the code that dereferences the pointers accesses the object. This is expected behavior and it shows the object is getting put in the event properly when runTheMatrix tests are run and pass with object being put in the event.