CMS 3D CMS Logo

TestHelperClass.cc
Go to the documentation of this file.
1 #include "TestHelperClass.h"
2 
5  : getToken_(iC.consumes(iConfig.getParameter<edm::InputTag>("source"))),
6  esTokenHost_(iC.esConsumes()),
7  esTokenDevice_(iC.esConsumes()) {}
8 
10  [[maybe_unused]] auto esDataHostHandle = iSetup.getHandle(esTokenHost_);
11  [[maybe_unused]] auto const& esDataDevice = iSetup.getData(esTokenDevice_);
12  portabletest::TestDeviceCollection const& deviceProduct = iEvent.get(getToken_);
13 
14  hostProduct_ = portabletest::TestHostCollection{deviceProduct->metadata().size(), iEvent.queue()};
15 
16  alpaka::memcpy(iEvent.queue(), hostProduct_.buffer(), deviceProduct.const_buffer());
17  }
18 } // namespace ALPAKA_ACCELERATOR_NAMESPACE
TestHelperClass(edm::ParameterSet const &iConfig, edm::ConsumesCollector iC)
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
const device::EDGetToken< portabletest::TestDeviceCollection > getToken_
void makeAsync(device::Event const &iEvent, device::EventSetup const &iSetup)
edm::ESHandle< T > getHandle(edm::ESGetToken< T, R > const &iToken) const
Definition: EventSetup.h:40
int iEvent
Definition: GenABIO.cc:224
const edm::ESGetToken< cms::alpakatest::ESTestDataA, AlpakaESTestRecordA > esTokenHost_
T const & getData(edm::ESGetToken< T, R > const &iToken) const
Definition: EventSetup.h:27
const device::ESGetToken< AlpakaESTestDataCDevice, AlpakaESTestRecordC > esTokenDevice_
HLT enums.
portabletest::TestHostCollection hostProduct_