Skip to content

Conversation

@fwyzard
Copy link
Contributor

@fwyzard fwyzard commented Mar 4, 2025

PR description:

Specialise Handle and OrphanHandle for WrapperBase: this lets users produce and consume collections via their wrapper, using their run time type information (e.g. type name, type id, ...) instead of the compile time types. Implement integration test for this specialisations.

Introduce a MemcpyTraits structure, that should be specialised for types that can be safely memcpyed, without requiring a full ROOT streamer de/serialisation.
Specialise the MemcpyTraits for arithmetic types and vectors of arithmetic types, and all PortableObject and PortableCollection types.

Implement edmtest::GenericCloner: this EDProducer will consume and clone all the event products declared by its configuration; a direct memcpy will be used for types that support the MemcpyTraits interface; the ROOT dictionaries will be use to serialise and deserialise the other tyepes.

PR validation:

Unit tests pass.

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:

May be backported to 15.0.x as part of the MPI work.

fwyzard added 3 commits March 4, 2025 13:49
This EDProducer will clone all the event products declared by its
configuration, using their ROOT dictionaries.
@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 4, 2025

cms-bot internal usage

@fwyzard
Copy link
Contributor Author

fwyzard commented Mar 4, 2025

@makortel what do you think of this approach ?

I don't mind moving stuff around, of course: consider this more of a prototype.

@fwyzard
Copy link
Contributor Author

fwyzard commented Mar 4, 2025

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 4, 2025

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47504/43956

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 4, 2025

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47504/43957

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 4, 2025

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

It involves the following packages:

  • DataFormats/Common (core)
  • DataFormats/Portable (heterogeneous)
  • FWCore/Framework (core)
  • FWCore/Integration (core)
  • FWCore/TestModules (core)

@Dr15Jones, @cmsbuild, @fwyzard, @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.
@antoniovilela, @mandrenguyen, @rappoccio, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

Copy link
Contributor Author

@fwyzard fwyzard Mar 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of this could actually go directly under DataFormats/Common, only the specialisation of the Event methods need to go in FWCore/Framework.
Let me know if I should split and rearrange this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of this could actually go directly under DataFormats/Common, only the specialisation of the Event methods need to go in FWCore/Framework.
Let me know if I should split and rearrange this.

return {object->metadata().size()};
}

static std::vector<std::pair<void*, std::size_t>> regions(PortableDeviceCollection<T, TDev>& object) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make the specialisation for PortableDeviceCollection work, some kind of pass-through specialisation for edm::DeviceProduct is still needed.

@makortel
Copy link
Contributor

makortel commented Sep 2, 2025

About the directory structure, we should create a new one parallel to DataFormats, e.g. DataFormatsSerialisation ?

Right. Following the structure of the CondDB, i.e. CondCore package, maybe package called TrivialSerialization that would contain a subpackage for the infrastructure, and subpackages that mirror the DataFormats subpackages that need the new plugins (as in your example).

@fwyzard
Copy link
Contributor Author

fwyzard commented Sep 3, 2025 via email

@cmsbuild
Copy link
Contributor

Milestone for this pull request has been moved to CMSSW_16_0_X. Please open a backport if it should also go in to CMSSW_15_1_X.

@cmsbuild cmsbuild modified the milestones: CMSSW_15_1_X, CMSSW_16_0_X Sep 10, 2025
ghyls added a commit to ghyls/cmssw that referenced this pull request Oct 13, 2025
ghyls added a commit to ghyls/cmssw that referenced this pull request Oct 13, 2025
ghyls added a commit to ghyls/cmssw that referenced this pull request Oct 13, 2025
ghyls added a commit to ghyls/cmssw that referenced this pull request Oct 13, 2025
ghyls added a commit to ghyls/cmssw that referenced this pull request Oct 13, 2025
@fwyzard
Copy link
Contributor Author

fwyzard commented Oct 28, 2025

type ngt

@fwyzard
Copy link
Contributor Author

fwyzard commented Nov 23, 2025

The framework part of this PR (the first two commits) has been rebased and moved to #49449.

The second part has been reimplemented with the plugin-based serialisation approach, and will be moved to a different PR.

@fwyzard fwyzard closed this Nov 23, 2025
@fwyzard
Copy link
Contributor Author

fwyzard commented Nov 25, 2025

The plugin-based serialisation mechanism is implemented in #49475.

@fwyzard fwyzard deleted the implement_generic_product_tools_v2 branch November 25, 2025 22:18
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.

3 participants