CMS 3D CMS Logo

TestAlpakaESProducerD.cc
Go to the documentation of this file.
14 
15 #include "testESAlgoAsync.h"
16 
24  public:
25  TestAlpakaESProducerD(edm::ParameterSet const& iConfig) : ESProducer(iConfig) {
26  auto cc = setWhatProduced(this);
27  tokenA_ = cc.consumes(iConfig.getParameter<edm::ESInputTag>("srcA"));
28  tokenB_ = cc.consumes(iConfig.getParameter<edm::ESInputTag>("srcB"));
29  }
30 
31  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
33  desc.add("srcA", edm::ESInputTag{});
34  desc.add("srcB", edm::ESInputTag{});
35  descriptions.addWithDefaultLabel(desc);
36  }
37 
38  std::optional<AlpakaESTestDataDDevice> produce(device::Record<AlpakaESTestRecordD> const& iRecord) {
39  auto const& dataA = iRecord.get(tokenA_);
40  auto const& dataB = iRecord.get(tokenB_);
41 
42  return testESAlgoAsync(iRecord.queue(), dataA, dataB);
43  }
44 
45  private:
48  };
49 } // namespace ALPAKA_ACCELERATOR_NAMESPACE
50 
51 DEFINE_FWK_EVENTSETUP_ALPAKA_MODULE(TestAlpakaESProducerD);
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
TProduct const & get(edm::ESGetToken< TProduct, TDepRecord > const &iToken) const
Definition: Record.h:86
device::ESGetToken< AlpakaESTestDataADevice, AlpakaESTestRecordA > tokenA_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
AlpakaESTestDataDDevice testESAlgoAsync(Queue &queue, AlpakaESTestDataADevice const &dataA, cms::alpakatest::AlpakaESTestDataB< Device > const &dataB)
auto setWhatProduced(T *iThis, edm::es::Label const &label={})
Definition: ESProducer.h:39
#define DEFINE_FWK_EVENTSETUP_ALPAKA_MODULE(type)
Definition: ModuleFactory.h:17
std::optional< AlpakaESTestDataDDevice > produce(device::Record< AlpakaESTestRecordD > const &iRecord)
device::ESGetToken< cms::alpakatest::AlpakaESTestDataB< Device >, AlpakaESTestRecordB > tokenB_