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

Removed unused code related to OwnVector #43931

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

wddgit
Copy link
Contributor

@wddgit wddgit commented Feb 9, 2024

PR description:

Remove unused 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.

This PR is just dealing with some of the easiest cases. Code that isn't used anymore (some was maybe never used). Matti initially identified this list in Issue #42734 and this issue also contains more information related to this. These are the "Clearly unused" cases on Matti's list. I spent some time with grep and git grep and double checking that they were not used. I tried to delete anything directly related OwnVector or there only to support OwnVector. There probably is more cleanup that could be done in this part of the code. For example, the class FastTrackerCluster appears to be completely unused. I'll delete it also if anyone asks.

An example of a typical class in this set of changes, edm::OwnVector<SiPixelRecHit> was initially committed in 2006 and then replaced by edmNew::DetSetVector in 2007, except the dictionaries were left in the code (maybe for backward compatibility at that time, I don't know) and never cleaned up.

PR validation:

As a temporary test I added the following to OwnVector.h, then ran checkdeps, and then ran "scram b". It succeeded. This shows nothing uses OwnVector for these types. I did this for CMSSW_14_1_X_2024-02-08-1100 and CMSSW_10_6_39. This should eliminate the possibility anything could produce objects of these types or use them in any way. I guess the only possible weakness of this test is something might read an old file using a View or the code might be different in other releases, but that does not seem likely.

I removed this after running the test. It is not in the PR.

   class OwnVector {
+    static_assert(!std::is_same_v<T, SiPixelRecHit>,
+        "foo does not support Bar1");
+    static_assert(!std::is_same_v<T, SiStripRecHit1D>,
+        "foo does not support Bar2");
+    static_assert(!std::is_same_v<T, SiStripRecHit2D>,
+        "foo does not support Bar3");
+    static_assert(!std::is_same_v<T, SiTrackerMultiRecHit>,
+        "foo does not support Bar4");
+    static_assert(!std::is_same_v<T, MTDTrackingRecHit>,
+        "foo does not support Bar5");
+    static_assert(!std::is_same_v<T, FastTrackerCluster>,
+        "foo does not support Bar6");
+    static_assert(!std::is_same_v<T, CSCStripHit>,
+        "foo does not support Bar7");

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 9, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 9, 2024

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-43931/38787

  • This PR adds an extra 24KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 9, 2024

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

It involves the following packages:

  • DataFormats/TrackerRecHit2D (reconstruction)
  • FastSimDataFormats/External (fastsim)
  • RecoLocalMuon/CSCRecHitD (reconstruction)

@jfernan2, @cmsbuild, @sbein, @ssekmen, @civanch, @mdhildreth, @mandrenguyen can you please review it and eventually sign? Thanks.
@gpetruc, @JanFSchulte, @VinInn, @jhgoh, @VourMa, @mtosi, @ptcox, @abbiendi, @mmusich, @bellan, @missirol, @rovere this is something you requested to watch as well.
@antoniovilela, @rappoccio, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@wddgit
Copy link
Contributor Author

wddgit commented Feb 9, 2024

please test

FYI @makortel

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-15b99c/37334/summary.html
COMMIT: 021a0e0
CMSSW: CMSSW_14_1_X_2024-02-09-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/43931/37334/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially added 97 lines to the logs
  • Reco comparison results: 45 differences found in the comparisons
  • DQMHistoTests: Total files compared: 48
  • DQMHistoTests: Total histograms compared: 3248626
  • DQMHistoTests: Total failures: 3
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3248601
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 47 files compared)
  • Checked 200 log files, 161 edm output root files, 48 DQM output files
  • TriggerResults: no differences found

@mandrenguyen
Copy link
Contributor

+reconstruction
code cleanup

@civanch
Copy link
Contributor

civanch commented Feb 12, 2024

+1

@sbein , it is technical code clean-up, I do think it affect any result

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

@antoniovilela
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 3143a05 into cms-sw:master Feb 13, 2024
11 checks passed
@wddgit wddgit deleted the removedUnusedCodeRelatedToOwnVector 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.

5 participants