Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion DataFormats/BeamSpot/plugins/alpaka/TrivialSerialisation.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "DataFormats/BeamSpot/interface/BeamSpotHost.h"
#include "DataFormats/BeamSpot/interface/alpaka/BeamSpotDevice.h"
#include "HeterogeneousCore/TrivialSerialisation/interface/alpaka/SerialiserFactoryDevice.h"

DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(BeamSpotDevice);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(BeamSpotHost, BeamSpotDevice);
6 changes: 4 additions & 2 deletions DataFormats/EcalDigi/plugins/alpaka/TrivialSerialisation.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include "DataFormats/EcalDigi/interface/EcalDigiHostCollection.h"
#include "DataFormats/EcalDigi/interface/EcalDigiPhase2HostCollection.h"
#include "DataFormats/EcalDigi/interface/alpaka/EcalDigiDeviceCollection.h"
#include "DataFormats/EcalDigi/interface/alpaka/EcalDigiPhase2DeviceCollection.h"
#include "HeterogeneousCore/TrivialSerialisation/interface/alpaka/SerialiserFactoryDevice.h"

DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(EcalDigiDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(EcalDigiPhase2DeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(EcalDigiHostCollection, EcalDigiDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(EcalDigiPhase2HostCollection, EcalDigiPhase2DeviceCollection);
6 changes: 4 additions & 2 deletions DataFormats/EcalRecHit/plugins/alpaka/TrivialSerialisation.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include "DataFormats/EcalRecHit/interface/EcalRecHitHostCollection.h"
#include "DataFormats/EcalRecHit/interface/EcalUncalibratedRecHitHostCollection.h"
#include "DataFormats/EcalRecHit/interface/alpaka/EcalRecHitDeviceCollection.h"
#include "DataFormats/EcalRecHit/interface/alpaka/EcalUncalibratedRecHitDeviceCollection.h"
#include "HeterogeneousCore/TrivialSerialisation/interface/alpaka/SerialiserFactoryDevice.h"

DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(EcalRecHitDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(EcalUncalibratedRecHitDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(EcalRecHitHostCollection, EcalRecHitDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(EcalUncalibratedRecHitHostCollection, EcalUncalibratedRecHitDeviceCollection);
9 changes: 6 additions & 3 deletions DataFormats/HGCalDigi/plugins/alpaka/TrivialSerialisation.cc
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#include "DataFormats/HGCalDigi/interface/HGCalDigiHost.h"
#include "DataFormats/HGCalDigi/interface/HGCalECONDPacketInfoHost.h"
#include "DataFormats/HGCalDigi/interface/HGCalFEDPacketInfoHost.h"
#include "DataFormats/HGCalDigi/interface/alpaka/HGCalDigiDevice.h"
#include "DataFormats/HGCalDigi/interface/alpaka/HGCalECONDPacketInfoDevice.h"
#include "DataFormats/HGCalDigi/interface/alpaka/HGCalFEDPacketInfoDevice.h"
#include "HeterogeneousCore/TrivialSerialisation/interface/alpaka/SerialiserFactoryDevice.h"

DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(hgcaldigi::HGCalDigiDevice);
DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(hgcaldigi::HGCalECONDPacketInfoDevice);
DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(hgcaldigi::HGCalFEDPacketInfoDevice);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(hgcaldigi::HGCalDigiHost, hgcaldigi::HGCalDigiDevice);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(hgcaldigi::HGCalECONDPacketInfoHost, hgcaldigi::HGCalECONDPacketInfoDevice);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(hgcaldigi::HGCalFEDPacketInfoHost, hgcaldigi::HGCalFEDPacketInfoDevice);
9 changes: 6 additions & 3 deletions DataFormats/HGCalReco/plugins/alpaka/TrivialSerialisation.cc
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#include "DataFormats/HGCalReco/interface/HGCalSoAClustersHostCollection.h"
#include "DataFormats/HGCalReco/interface/HGCalSoARecHitsExtraHostCollection.h"
#include "DataFormats/HGCalReco/interface/HGCalSoARecHitsHostCollection.h"
#include "DataFormats/HGCalReco/interface/alpaka/HGCalSoAClustersDeviceCollection.h"
#include "DataFormats/HGCalReco/interface/alpaka/HGCalSoARecHitsExtraDeviceCollection.h"
#include "DataFormats/HGCalReco/interface/alpaka/HGCalSoARecHitsDeviceCollection.h"
#include "HeterogeneousCore/TrivialSerialisation/interface/alpaka/SerialiserFactoryDevice.h"

DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(HGCalSoAClustersDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(HGCalSoARecHitsExtraDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(HGCalSoARecHitsDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(HGCalSoAClustersHostCollection, HGCalSoAClustersDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(HGCalSoARecHitsExtraHostCollection, HGCalSoARecHitsExtraDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(HGCalSoARecHitsHostCollection, HGCalSoARecHitsDeviceCollection);
5 changes: 3 additions & 2 deletions DataFormats/HcalDigi/plugins/alpaka/TrivialSerialisation.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "DataFormats/HcalDigi/interface/HcalDigiHostCollection.h"
#include "DataFormats/HcalDigi/interface/alpaka/HcalDigiDeviceCollection.h"
#include "HeterogeneousCore/TrivialSerialisation/interface/alpaka/SerialiserFactoryDevice.h"

DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(hcal::Phase0DigiDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(hcal::Phase1DigiDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(hcal::Phase0DigiHostCollection, hcal::Phase0DigiDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(hcal::Phase1DigiHostCollection, hcal::Phase1DigiDeviceCollection);
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "DataFormats/HcalRecHit/interface/HcalRecHitHostCollection.h"
#include "DataFormats/HcalRecHit/interface/alpaka/HcalRecHitDeviceCollection.h"
#include "HeterogeneousCore/TrivialSerialisation/interface/alpaka/SerialiserFactoryDevice.h"

DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(hcal::RecHitDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(hcal::RecHitHostCollection, hcal::RecHitDeviceCollection);
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
// Include the Eigen core library before including the SoA definitions
#include <Eigen/Core>

#include "DataFormats/ParticleFlowReco/interface/CaloRecHitHostCollection.h"
#include "DataFormats/ParticleFlowReco/interface/PFClusterHostCollection.h"
#include "DataFormats/ParticleFlowReco/interface/PFRecHitFractionHostCollection.h"
#include "DataFormats/ParticleFlowReco/interface/PFRecHitHostCollection.h"
#include "DataFormats/ParticleFlowReco/interface/alpaka/CaloRecHitDeviceCollection.h"
#include "DataFormats/ParticleFlowReco/interface/alpaka/PFClusterDeviceCollection.h"
#include "DataFormats/ParticleFlowReco/interface/alpaka/PFRecHitFractionDeviceCollection.h"
#include "DataFormats/ParticleFlowReco/interface/alpaka/PFRecHitDeviceCollection.h"
#include "HeterogeneousCore/TrivialSerialisation/interface/alpaka/SerialiserFactoryDevice.h"

DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(reco::CaloRecHitDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(reco::PFClusterDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(reco::PFRecHitFractionDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(reco::PFRecHitDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(reco::CaloRecHitHostCollection, reco::CaloRecHitDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(reco::PFClusterHostCollection, reco::PFClusterDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(reco::PFRecHitFractionHostCollection, reco::PFRecHitFractionDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(reco::PFRecHitHostCollection, reco::PFRecHitDeviceCollection);
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#include "DataFormats/PortableTestObjects/interface/ImageHostCollection.h"
#include "DataFormats/PortableTestObjects/interface/LogitsHostCollection.h"
#include "DataFormats/PortableTestObjects/interface/MaskHostCollection.h"
#include "DataFormats/PortableTestObjects/interface/MultiHeadNetHostCollection.h"
#include "DataFormats/PortableTestObjects/interface/ParticleHostCollection.h"
#include "DataFormats/PortableTestObjects/interface/SimpleNetHostCollection.h"
#include "DataFormats/PortableTestObjects/interface/TestHostCollection.h"
#include "DataFormats/PortableTestObjects/interface/TestHostObject.h"
#include "DataFormats/PortableTestObjects/interface/alpaka/ImageDeviceCollection.h"
#include "DataFormats/PortableTestObjects/interface/alpaka/LogitsDeviceCollection.h"
#include "DataFormats/PortableTestObjects/interface/alpaka/MaskDeviceCollection.h"
Expand All @@ -8,13 +16,15 @@
#include "DataFormats/PortableTestObjects/interface/alpaka/TestDeviceObject.h"
#include "HeterogeneousCore/TrivialSerialisation/interface/alpaka/SerialiserFactoryDevice.h"

DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(portabletest::ImageDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(portabletest::LogitsDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(portabletest::MaskDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(portabletest::MultiHeadNetDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(portabletest::ParticleDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(portabletest::SimpleNetDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(portabletest::TestDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(portabletest::TestDeviceCollection2);
DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(portabletest::TestDeviceCollection3);
DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(portabletest::TestDeviceObject);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(portabletest::ImageHostCollection, portabletest::ImageDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(portabletest::LogitsHostCollection, portabletest::LogitsDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(portabletest::MaskHostCollection, portabletest::MaskDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(portabletest::MultiHeadNetHostCollection,
portabletest::MultiHeadNetDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(portabletest::ParticleHostCollection, portabletest::ParticleDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(portabletest::SimpleNetHostCollection,
portabletest::SimpleNetDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(portabletest::TestHostCollection, portabletest::TestDeviceCollection);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(portabletest::TestHostCollection2, portabletest::TestDeviceCollection2);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(portabletest::TestHostCollection3, portabletest::TestDeviceCollection3);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(portabletest::TestHostObject, portabletest::TestDeviceObject);
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "DataFormats/SiPixelClusterSoA/interface/SiPixelClustersHost.h"
#include "DataFormats/SiPixelClusterSoA/interface/alpaka/SiPixelClustersSoACollection.h"
#include "HeterogeneousCore/TrivialSerialisation/interface/alpaka/SerialiserFactoryDevice.h"

DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(SiPixelClustersSoACollection);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(SiPixelClustersHost, SiPixelClustersSoACollection);
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include "DataFormats/SiPixelDigiSoA/interface/SiPixelDigiErrorsHost.h"
#include "DataFormats/SiPixelDigiSoA/interface/SiPixelDigisHost.h"
#include "DataFormats/SiPixelDigiSoA/interface/alpaka/SiPixelDigiErrorsSoACollection.h"
#include "DataFormats/SiPixelDigiSoA/interface/alpaka/SiPixelDigisSoACollection.h"
#include "HeterogeneousCore/TrivialSerialisation/interface/alpaka/SerialiserFactoryDevice.h"

DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(SiPixelDigiErrorsSoACollection);
DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(SiPixelDigisSoACollection);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(SiPixelDigiErrorsHost, SiPixelDigiErrorsSoACollection);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(SiPixelDigisHost, SiPixelDigisSoACollection);
12 changes: 12 additions & 0 deletions DataFormats/SiStripClusterSoA/plugins/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<library file="TrivialSerialisation.cc" name="DataFormatsSiStripClusterSoATrivialSerialisation">
<use name="DataFormats/SiStripClusterSoA"/>
<use name="HeterogeneousCore/TrivialSerialisation"/>
<flags EDM_PLUGIN="1"/>
</library>

<library file="alpaka/TrivialSerialisation.cc" name="DataFormatsSiStripClusterSoATrivialSerialisationPortable">
<use name="DataFormats/SiStripClusterSoA"/>
<use name="HeterogeneousCore/TrivialSerialisation"/>
<flags ALPAKA_BACKENDS="1"/>
<flags EDM_PLUGIN="1"/>
</library>
4 changes: 4 additions & 0 deletions DataFormats/SiStripClusterSoA/plugins/TrivialSerialisation.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#include "DataFormats/SiStripClusterSoA/interface/SiStripClusterHost.h"
#include "HeterogeneousCore/TrivialSerialisation/interface/SerialiserFactory.h"

DEFINE_TRIVIAL_SERIALISER_PLUGIN(sistrip::SiStripClusterHost);
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include "DataFormats/SiStripClusterSoA/interface/SiStripClusterHost.h"
#include "DataFormats/SiStripClusterSoA/interface/alpaka/SiStripClusterDevice.h"
#include "HeterogeneousCore/TrivialSerialisation/interface/alpaka/SerialiserFactoryDevice.h"

DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(sistrip::SiStripClusterHost, sistrip::SiStripClusterDevice);
13 changes: 13 additions & 0 deletions DataFormats/SiStripDigiSoA/plugins/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<library file="TrivialSerialisation.cc" name="DataFormatsSiStripDigiSoATrivialSerialisation">
<use name="DataFormats/SiStripDigiSoA"/>
<use name="HeterogeneousCore/TrivialSerialisation"/>
<flags EDM_PLUGIN="1"/>
</library>

<library file="alpaka/TrivialSerialisation.cc" name="DataFormatsSiStripDigiSoATrivialSerialisationPortable">
<use name="DataFormats/SiStripDigiSoA"/>
<use name="HeterogeneousCore/TrivialSerialisation"/>
<flags ALPAKA_BACKENDS="1"/>
<flags EDM_PLUGIN="1"/>
</library>

4 changes: 4 additions & 0 deletions DataFormats/SiStripDigiSoA/plugins/TrivialSerialisation.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#include "DataFormats/SiStripDigiSoA/interface/SiStripDigiHost.h"
#include "HeterogeneousCore/TrivialSerialisation/interface/SerialiserFactory.h"

DEFINE_TRIVIAL_SERIALISER_PLUGIN(sistrip::SiStripDigiHost);
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include "DataFormats/SiStripDigiSoA/interface/SiStripDigiHost.h"
#include "DataFormats/SiStripDigiSoA/interface/alpaka/SiStripDigiDevice.h"
#include "HeterogeneousCore/TrivialSerialisation/interface/alpaka/SerialiserFactoryDevice.h"

DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(sistrip::SiStripDigiHost, sistrip::SiStripDigiDevice);
3 changes: 2 additions & 1 deletion DataFormats/TrackSoA/plugins/alpaka/TrivialSerialisation.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "DataFormats/TrackSoA/interface/TracksHost.h"
#include "DataFormats/TrackSoA/interface/alpaka/TracksSoACollection.h"
#include "HeterogeneousCore/TrivialSerialisation/interface/alpaka/SerialiserFactoryDevice.h"

DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(reco::TracksSoACollection);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(reco::TracksHost, reco::TracksSoACollection);
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "DataFormats/TrackingRecHitSoA/interface/TrackingRecHitsHost.h"
#include "DataFormats/TrackingRecHitSoA/interface/alpaka/TrackingRecHitsSoACollection.h"
#include "HeterogeneousCore/TrivialSerialisation/interface/alpaka/SerialiserFactoryDevice.h"

DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(reco::TrackingRecHitsSoACollection);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(reco::TrackingRecHitHost, reco::TrackingRecHitsSoACollection);
3 changes: 2 additions & 1 deletion DataFormats/VertexSoA/plugins/alpaka/TrivialSerialisation.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "DataFormats/VertexSoA/interface/ZVertexHost.h"
#include "DataFormats/VertexSoA/interface/alpaka/ZVertexSoACollection.h"
#include "HeterogeneousCore/TrivialSerialisation/interface/alpaka/SerialiserFactoryDevice.h"

DEFINE_TRIVIAL_SERIALISER_PLUGIN_DEVICE(reco::ZVertexSoACollection);
DEFINE_TRIVIAL_SERIALISER_PORTABLE_PLUGIN(reco::ZVertexHost, reco::ZVertexSoACollection);
13 changes: 13 additions & 0 deletions FWCore/Framework/interface/stream/implementors.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <cstddef>
#include <functional>
#include <memory>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
Expand Down Expand Up @@ -369,6 +370,18 @@ namespace edm {
});
}

// Non-templated overload for the registration at runtime of products
// whose type is not known at compile-time
void registerTransformAsync(
edm::EDPutToken iToken,
std::function<std::any(edm::StreamID, edm::WrapperBase const&, edm::WaitingTaskWithArenaHolder)> iPre,
std::function<std::unique_ptr<edm::WrapperBase>(edm::StreamID, std::any)> iF,
edm::TypeID returnType,
std::string productInstance) {
TransformerBase::registerTransformAsyncImp(
*this, iToken, returnType, std::move(productInstance), std::move(iPre), std::move(iF));
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please extend this overload to the other module base classes that provide Transformer (that is, global and limited).

The real test suite for the Transformer is in

<test name="testFWCoreIntegrationTransform" command="cmsRun ${LOCALTOP}/src/FWCore/Integration/test/transformTest_cfg.py"/>
<test name="testFWCoreIntegrationTransform_async" command="cmsRun ${LOCALTOP}/src/FWCore/Integration/test/transformTest_cfg.py --async_"/>
<test name="testFWCoreIntegrationTransform_async_tracer" command="cmsRun ${LOCALTOP}/src/FWCore/Integration/test/transformTest_cfg.py --async_ --addTracer 2>&amp;1 | fgrep 'transform in event' | wc | awk '{print $1}' | fgrep 24"/>
<test name="testFWCoreIntegrationTransform_onPath" command="cmsRun ${LOCALTOP}/src/FWCore/Integration/test/transformTest_cfg.py --onPath"/>
<test name="testFWCoreIntegrationTransform_onPath_async" command="cmsRun ${LOCALTOP}/src/FWCore/Integration/test/transformTest_cfg.py --onPath --async_"/>
<test name="testFWCoreIntegrationTransform_noTransform" command="cmsRun ${LOCALTOP}/src/FWCore/Integration/test/transformTest_cfg.py --noTransform"/>
<test name="testFWCoreIntegrationTransform_noTransform_async" command="cmsRun ${LOCALTOP}/src/FWCore/Integration/test/transformTest_cfg.py --noTransform --async_"/>
<test name="testFWCoreIntegrationTransform_noTransform_onPath" command="cmsRun ${LOCALTOP}/src/FWCore/Integration/test/transformTest_cfg.py --noTransform --onPath"/>
<test name="testFWCoreIntegrationTransform_noTransform_onPath_async" command="cmsRun ${LOCALTOP}/src/FWCore/Integration/test/transformTest_cfg.py --noTransform --onPath --async_"/>
<test name="testFWCoreIntegrationTransform_stream" command="cmsRun ${LOCALTOP}/src/FWCore/Integration/test/transformTest_cfg.py --stream"/>
<test name="testFWCoreIntegrationTransform_stream_async" command="cmsRun ${LOCALTOP}/src/FWCore/Integration/test/transformTest_cfg.py --stream --async_"/>
<test name="testFWCoreIntegrationTransform_stream_onPath" command="cmsRun ${LOCALTOP}/src/FWCore/Integration/test/transformTest_cfg.py --stream --onPath"/>
<test name="testFWCoreIntegrationTransform_stream_onPath_async" command="cmsRun ${LOCALTOP}/src/FWCore/Integration/test/transformTest_cfg.py --stream --onPath --async_"/>
<test name="testFWCoreIntegrationTransform_noPut" command="! cmsRun ${LOCALTOP}/src/FWCore/Integration/test/transformTest_cfg.py --noPut"/>
<test name="testFWCoreIntegrationTransform_noPut_async" command="! cmsRun ${LOCALTOP}/src/FWCore/Integration/test/transformTest_cfg.py --noPut --async_"/>
<test name="testFWCoreIntegrationTransform_exception" command="cmsRun ${LOCALTOP}/src/FWCore/Integration/test/transformTest_cfg.py --exception 2>&amp;1 | fgrep 'exception for testing purposes'"/>
<test name="testFWCoreIntegrationTransform_async_exception" command="cmsRun ${LOCALTOP}/src/FWCore/Integration/test/transformTest_cfg.py --async --exception 2>&amp;1 | fgrep 'exception for testing purposes'"/>
<test name="testFWCoreIntegrationTransform_onPath_exception" command="cmsRun ${LOCALTOP}/src/FWCore/Integration/test/transformTest_cfg.py --onPath --exception 2>&amp;1 | fgrep 'exception for testing purposes'"/>
<test name="testFWCoreIntegrationTransform_onPath_async_exception" command="cmsRun ${LOCALTOP}/src/FWCore/Integration/test/transformTest_cfg.py --onPath --async --exception 2>&amp;1 | fgrep 'exception for testing purposes'"/>

Could you extend those to cover this overload as well?


private:
size_t transformIndex_(edm::ProductDescription const& iBranch) const noexcept final {
return TransformerBase::findMatchingIndex(*this, iBranch);
Expand Down
34 changes: 34 additions & 0 deletions FWCore/Framework/test/stream_producer_catch2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "FWCore/Framework/interface/stream/EDProducerAdaptor.h"
#include "FWCore/Framework/interface/OccurrenceTraits.h"
#include "FWCore/Framework/interface/ProductResolversFactory.h"
#include "DataFormats/Common/interface/Wrapper.h"
#include "DataFormats/Provenance/interface/ProductRegistry.h"
#include "DataFormats/Provenance/interface/BranchIDListHelper.h"
#include "FWCore/Framework/interface/HistoryAppender.h"
Expand All @@ -27,6 +28,7 @@
#include "FWCore/ServiceRegistry/interface/StreamContext.h"
#include "FWCore/Concurrency/interface/FinalWaitingTask.h"
#include "FWCore/Utilities/interface/GlobalIdentifier.h"
#include "FWCore/Utilities/interface/TypeID.h"

#include "FWCore/Utilities/interface/Exception.h"

Expand Down Expand Up @@ -349,6 +351,33 @@ namespace {
edm::EDPutTokenT<float> token_;
};

class TransformAsyncUntypedProd : public edm::stream::EDProducer<edm::Transformer> {
public:
struct IntHolder {
IntHolder() : value_(0) {}
IntHolder(int iV) : value_(iV) {}
int value_;
};
TransformAsyncUntypedProd(edm::ParameterSet const&) {
edm::EDPutToken token = produces<float>();
registerTransformAsync(
token,
[](edm::StreamID, edm::WrapperBase const& iGotProduct, edm::WaitingTaskWithArenaHolder) {
return std::any(IntHolder(*static_cast<edm::Wrapper<float> const&>(iGotProduct).product()));
},
[](edm::StreamID, std::any iCache) -> std::unique_ptr<edm::WrapperBase> {
return std::make_unique<edm::Wrapper<int>>(edm::WrapperBase::Emplace{},
std::any_cast<IntHolder>(iCache).value_);
},
edm::TypeID(typeid(int)),
std::string{});
}

void produce(edm::Event& iEvent, edm::EventSetup const&) final {
//iEvent.emplace(token_, 3.625);
}
};

unsigned int BasicProd::m_count = 0;
unsigned int GlobalProd::m_count = 0;
unsigned int GlobalProdWithBeginJob::m_count = 0;
Expand Down Expand Up @@ -634,5 +663,10 @@ namespace {
Trans::kStreamEndLuminosityBlock,
Trans::kGlobalEndLuminosityBlock});
}

SECTION("transformAsyncUntypedProdTest") {
auto mod = createModule<TransformAsyncUntypedProd>();
REQUIRE(mod.get() != nullptr);
}
}
} // namespace
Loading