CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
TestPortableProducerCPU Class Reference
Inheritance diagram for TestPortableProducerCPU:
edm::stream::EDProducer<>

Public Member Functions

void produce (edm::Event &event, edm::EventSetup const &) override
 
 TestPortableProducerCPU (edm::ParameterSet const &config)
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Attributes

cudatest::TestAlgo algo_
 
const edm::EDPutTokenT< cudatest::TestHostCollectionhostToken_
 
const int32_t size_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Definition at line 16 of file TestPortableProducerCPU.cc.

Constructor & Destructor Documentation

◆ TestPortableProducerCPU()

TestPortableProducerCPU::TestPortableProducerCPU ( edm::ParameterSet const &  config)
inline

Definition at line 18 of file TestPortableProducerCPU.cc.

19  : hostToken_{produces()}, size_{config.getParameter<int32_t>("size")} {}
Definition: config.py:1
const edm::EDPutTokenT< cudatest::TestHostCollection > hostToken_

Member Function Documentation

◆ fillDescriptions()

static void TestPortableProducerCPU::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
inlinestatic

Definition at line 30 of file TestPortableProducerCPU.cc.

References edm::ConfigurationDescriptions::addWithDefaultLabel(), and submitPVResolutionJobs::desc.

30  {
32  desc.add<int32_t>("size");
33  descriptions.addWithDefaultLabel(desc);
34  }
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)

◆ produce()

void TestPortableProducerCPU::produce ( edm::Event event,
edm::EventSetup const &   
)
inlineoverride

Definition at line 21 of file TestPortableProducerCPU.cc.

References algo_, cudatest::TestAlgo::fill(), hostToken_, eostools::move(), and size_.

21  {
22  // run the algorithm
24  algo_.fill(hostProduct);
25 
26  // put the product into the event
27  event.emplace(hostToken_, std::move(hostProduct));
28  }
void fill(cudatest::TestDeviceCollection &collection, cudaStream_t stream) const
const edm::EDPutTokenT< cudatest::TestHostCollection > hostToken_
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ algo_

cudatest::TestAlgo TestPortableProducerCPU::algo_
private

Definition at line 41 of file TestPortableProducerCPU.cc.

Referenced by produce().

◆ hostToken_

const edm::EDPutTokenT<cudatest::TestHostCollection> TestPortableProducerCPU::hostToken_
private

Definition at line 37 of file TestPortableProducerCPU.cc.

Referenced by produce().

◆ size_

const int32_t TestPortableProducerCPU::size_
private

Definition at line 38 of file TestPortableProducerCPU.cc.

Referenced by produce().