Skip to content
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

Remove or replace OwnVector<SiStripMatchedRecHit2D> #43987

Merged

Conversation

wddgit
Copy link
Contributor

@wddgit wddgit commented Feb 15, 2024

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<SiStripMatchedRecHit2D> is removed or replaced. This is one of the classes on Matti's list in the issue.

The dictionaries in classes_def.xml are removed and also an unused typedef.

The other usage in SiStripRecHitMatcher and SiStripRecHitConverterAlgorithm is replaced by a std::vector<std::unique_ptr<SiStripMatchedRecHit2D>>. As used in that part of the code, the object is not persistent so there aren't any backward compatibility issues and the replacement should work exactly the same as the OwnVector.

It appears that the OwnVector dictionaries were originally introduced in 2006 and new DetSetVector containers replaced them in 2007. Probably the OwnVector code was kept for backward compatibility originally and no one ever had time or remembered to clean it up when backward compatibility to 2007 was no longer needed.

PR validation:

This relies on existing tests for the part that was converted to a vector<unique_ptr>. It should work identically to the way it worked before.

To test the deletion of the dictionaries, I added this in OwnVector.h and built

class OwnVector {
    static_assert(!std::is_same_v<T, SiStripRecHitMatcher>,
        "foo does not support Bar1");

This demonstrates nothing could be using this or writing this type persistently. I did that for a 14_1_X IB and also for 10_6_39. I suspect nothing has written products of this type since 2007, but didn't verify that with a test. 10_6_X is what we need for the legacy release work.

FYI @makortel

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 15, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-43987/38908

  • This PR adds an extra 32KB to repository

@wddgit
Copy link
Contributor Author

wddgit commented Feb 15, 2024

please test

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @wddgit (W. David Dagenhart) for master.

It involves the following packages:

  • DataFormats/TrackerRecHit2D (reconstruction)
  • RecoLocalTracker/SiStripRecHitConverter (reconstruction)
  • SLHCUpgradeSimulations/Geometry (upgrade, geometry)

@subirsarkar, @makortel, @srimanob, @jfernan2, @Dr15Jones, @mdhildreth, @mandrenguyen, @civanch, @bsunanda can you please review it and eventually sign? Thanks.
@gbenelli, @GiacomoSguazzoni, @gpetruc, @echabert, @yduhm, @threus, @JanFSchulte, @robervalwalsh, @missirol, @felicepantaleo, @mtosi, @VinInn, @jlidrych, @alesaggio, @VourMa, @mmusich, @rovere this is something you requested to watch as well.
@antoniovilela, @sextonkennedy, @rappoccio you are the release manager for this.

cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-144c09/37508/summary.html
COMMIT: 1c639d2
CMSSW: CMSSW_14_1_X_2024-02-15-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/43987/37508/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

@jfernan2
Copy link
Contributor

+1

@wddgit
Copy link
Contributor Author

wddgit commented Feb 16, 2024

Note that the part of this requiring upgrade and geometry signatures only deletes some comment lines (containing the deleted typedef) and removes one unused "#include "OwnVector.h".

@civanch
Copy link
Contributor

civanch commented Feb 16, 2024

+1

@srimanob
Copy link
Contributor

+Upgrade

@cmsbuild
Copy link
Contributor

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. @rappoccio, @antoniovilela, @sextonkennedy (and backports should be raised in the release meeting by the corresponding L2)

@rappoccio
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 08a010d into cms-sw:master Feb 19, 2024
11 checks passed
@wddgit wddgit deleted the removeOwnVectorSiStripMatchedRecHit2D branch March 7, 2024 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants