CMS 3D CMS Logo

TestHelperClass.cc
Go to the documentation of this file.
2 
3 #include "TestHelperClass.h"
4 
7  : getToken_(iC.consumes(iConfig.getParameter<edm::InputTag>("source"))),
8  esTokenHost_(iC.esConsumes()),
9  esTokenDevice_(iC.esConsumes()) {}
10 
12 
14  [[maybe_unused]] auto esDataHostHandle = iSetup.getHandle(esTokenHost_);
15  [[maybe_unused]] auto const& esDataDevice = iSetup.getData(esTokenDevice_);
16  portabletest::TestDeviceCollection const& deviceProduct = iEvent.get(getToken_);
17 
18  hostProduct_ = portabletest::TestHostCollection{deviceProduct->metadata().size(), iEvent.queue()};
19 
20  alpaka::memcpy(iEvent.queue(), hostProduct_.buffer(), deviceProduct.const_buffer());
21  }
22 } // 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:49
PortableCollection< TestSoA > TestDeviceCollection
int iEvent
Definition: GenABIO.cc:224
const edm::ESGetToken< cms::alpakatest::ESTestDataA, AlpakaESTestRecordA > esTokenHost_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void fillPSetDescription(edm::ParameterSetDescription &iDesc)
T const & getData(edm::ESGetToken< T, R > const &iToken) const
Definition: EventSetup.h:32
const device::ESGetToken< AlpakaESTestDataCDevice, AlpakaESTestRecordC > esTokenDevice_
HLT enums.
portabletest::TestHostCollection hostProduct_