Skip to content

Conversation

@ghyls
Copy link
Contributor

@ghyls ghyls commented Oct 28, 2025

PR description:

Add two methods to Wrapper.h, which are required by our implementation of a GenericCloner based on an edmplugin::PluginFactory (#49152):

void markAsPresent() { present = true; }

This is required to mark as present a newly created Wrapper<T> initialized in our case from an edm::WrapperBase&.

T const& bareProduct() const { return obj; }

We don't strictly need this overload, but we would appreciate having it, so we can call bareProduct() on a non const Wrapper<T>. Otherwise we would need to do *w.product();, but that includes a check for present that we don't need when we can ensure in advance that present is true.

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 28, 2025

cms-bot internal usage

@ghyls
Copy link
Contributor Author

ghyls commented Oct 28, 2025

type ngt

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @ghyls for master.

It involves the following packages:

  • DataFormats/Common (core)

@Dr15Jones, @cmsbuild, @makortel, @smuzaffar can you please review it and eventually sign? Thanks.
@makortel, @missirol, @mmusich, @rovere, @wddgit this is something you requested to watch as well.
@ftenchini, @mandrenguyen, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@fwyzard
Copy link
Contributor

fwyzard commented Oct 28, 2025

please test

@makortel
Copy link
Contributor

While this PR looks seemingly straightforward, I want to understand the wider context (#49152) first before commenting on markAsPresent() member function. It will probably take me something along a week or two to have a good moment to start digesting #49152.

The const bareProduct() overload is seemingly ~fine.

@cmsbuild
Copy link
Contributor

+1

Size: This PR adds an extra 24KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-d39ccf/48871/summary.html
COMMIT: 91cc6e6
CMSSW: CMSSW_16_0_X_2025-10-28-1100/el8_amd64_gcc13
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/49236/48871/install.sh to create a dev area with all the needed externals and cmssw changes.

The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:

You can see more details here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-d39ccf/48871/git-recent-commits.json
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-d39ccf/48871/git-merge-result

Comparison Summary

Summary:

  • You potentially added 1 lines to the logs
  • Reco comparison results: 5 differences found in the comparisons
  • DQMHistoTests: Total files compared: 51
  • DQMHistoTests: Total histograms compared: 3939953
  • DQMHistoTests: Total failures: 44
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3939889
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 50 files compared)
  • Checked 218 log files, 188 edm output root files, 51 DQM output files
  • TriggerResults: no differences found

@fwyzard
Copy link
Contributor

fwyzard commented Oct 28, 2025

The reason for markAsPresent() is the same as in #47504 (see also this comment): to mark a wrapper as non-empty before constructing the wrapped object in place.

The only difference is that the plugin-based approach can use the concrete Wrapper<T> type instead of going through WrapperBase, so it doesn't need to be a virtual method.

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.

4 participants