CMS 3D CMS Logo

TestPortableProducerCPU.cc
Go to the documentation of this file.
13 
14 #include "TestAlgo.h"
15 
17 public:
19  : hostToken_{produces()}, size_{config.getParameter<int32_t>("size")} {}
20 
21  void produce(edm::Event& event, edm::EventSetup const&) override {
22  // run the algorithm
24  algo_.fill(hostProduct);
25 
26  // put the product into the event
27  event.emplace(hostToken_, std::move(hostProduct));
28  }
29 
30  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
32  desc.add<int32_t>("size");
33  descriptions.addWithDefaultLabel(desc);
34  }
35 
36 private:
38  const int32_t size_;
39 
40  // implementation of the algorithm
42 };
43 
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
void fill(cudatest::TestDeviceCollection &collection, cudaStream_t stream) const
Definition: config.py:1
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
TestPortableProducerCPU(edm::ParameterSet const &config)
const edm::EDPutTokenT< cudatest::TestHostCollection > hostToken_
void produce(edm::Event &event, edm::EventSetup const &) override
def move(src, dest)
Definition: eostools.py:511
Definition: event.py:1