CMS 3D CMS Logo

TestAlpakaESProducerD.cc
Go to the documentation of this file.
13 
14 #include "testESAlgoAsync.h"
15 
23  public:
25  auto cc = setWhatProduced(this);
26  tokenA_ = cc.consumes();
27  tokenB_ = cc.consumes();
28  }
29 
30  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
32  descriptions.addWithDefaultLabel(desc);
33  }
34 
35  std::optional<AlpakaESTestDataDDevice> produce(device::Record<AlpakaESTestRecordD> const& iRecord) {
36  auto const& dataA = iRecord.get(tokenA_);
37  auto const& dataB = iRecord.get(tokenB_);
38 
39  return testESAlgoAsync(iRecord.queue(), dataA, dataB);
40  }
41 
42  private:
45  };
46 } // namespace ALPAKA_ACCELERATOR_NAMESPACE
47 
48 DEFINE_FWK_EVENTSETUP_ALPAKA_MODULE(TestAlpakaESProducerD);
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
TProduct const & get(edm::ESGetToken< TProduct, TDepRecord > const &iToken) const
Definition: Record.h:77
AlpakaESTestDataDDevice testESAlgoAsync(Queue &queue, AlpakaESTestDataA const &dataA, cms::alpakatest::AlpakaESTestDataB< Device > const &dataB)
device::ESGetToken< AlpakaESTestDataA, AlpakaESTestRecordA > tokenA_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
auto setWhatProduced(T *iThis, edm::es::Label const &label={})
Definition: ESProducer.h:28
#define DEFINE_FWK_EVENTSETUP_ALPAKA_MODULE(type)
Definition: ModuleFactory.h:9
std::optional< AlpakaESTestDataDDevice > produce(device::Record< AlpakaESTestRecordD > const &iRecord)
device::ESGetToken< cms::alpakatest::AlpakaESTestDataB< Device >, AlpakaESTestRecordB > tokenB_