CMS 3D CMS Logo

TestAlpakaStreamSynchronizingProducer.cc
Go to the documentation of this file.
6 
7 #include "TestHelperClass.h"
8 
22  public:
24  : esTokenDevice_(esConsumes()), putToken_{produces()}, helper_{iConfig, consumesCollector()} {}
25 
26  void acquire(device::Event const& iEvent, device::EventSetup const& iSetup) override {
27  [[maybe_unused]] auto const& esData = iSetup.getData(esTokenDevice_);
28 
29  helper_.makeAsync(iEvent, iSetup);
30  }
31 
32  void produce(device::Event& iEvent, device::EventSetup const& iSetup) override {
33  iEvent.emplace(putToken_, helper_.moveFrom());
34  }
35 
36  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
38  desc.add<edm::InputTag>("source");
39  descriptions.addWithDefaultLabel(desc);
40  }
41 
42  private:
45 
47  };
48 
49 } // namespace ALPAKA_ACCELERATOR_NAMESPACE
50 
52 DEFINE_FWK_ALPAKA_MODULE(TestAlpakaStreamSynchronizingProducer);
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
void acquire(device::Event const &iEvent, device::EventSetup const &iSetup) override
void makeAsync(device::Event const &iEvent, device::EventSetup const &iSetup)
const device::ESGetToken< AlpakaESTestDataDDevice, AlpakaESTestRecordD > esTokenDevice_
int iEvent
Definition: GenABIO.cc:224
portabletest::TestHostCollection moveFrom()
T const & getData(edm::ESGetToken< T, R > const &iToken) const
Definition: EventSetup.h:27
void produce(device::Event &iEvent, device::EventSetup const &iSetup) override
#define DEFINE_FWK_ALPAKA_MODULE(name)
Definition: MakerMacros.h:9