CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaGlobalProducerE Class Reference
Inheritance diagram for ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaGlobalProducerE:
ALPAKA_ACCELERATOR_NAMESPACE::global::EDProducer<> edm::ProducerBase< edm::global::EDProducer, Args... >

Public Member Functions

void produce (edm::StreamID, device::Event &iEvent, device::EventSetup const &iSetup) const override
 
 TestAlpakaGlobalProducerE (edm::ParameterSet const &config)
 
- Public Member Functions inherited from ALPAKA_ACCELERATOR_NAMESPACE::global::EDProducer<>
void produce (edm::StreamID sid, edm::Event &iEvent, edm::EventSetup const &iSetup) const final
 
- Public Member Functions inherited from edm::ProducerBase< edm::global::EDProducer, Args... >
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Attributes

TestAlgo algo_
 
const device::ESGetToken< AlpakaESTestDataEDevice, AlpakaESTestRecordCesToken_
 
const device::EDGetToken< portabletest::TestDeviceCollectiongetToken_
 
const device::EDGetToken< portabletest::TestDeviceMultiCollection2getTokenMulti2_
 
const device::EDGetToken< portabletest::TestDeviceMultiCollection3getTokenMulti3_
 
const device::EDPutToken< portabletest::TestDeviceCollectionputToken_
 
const device::EDPutToken< portabletest::TestDeviceMultiCollection2putTokenMulti2_
 
const device::EDPutToken< portabletest::TestDeviceMultiCollection3putTokenMulti3_
 

Additional Inherited Members

- Public Types inherited from edm::ProducerBase< edm::global::EDProducer, Args... >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Protected Member Functions inherited from edm::ProducerBase< edm::global::EDProducer, Args... >
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
BranchAliasSetterT< ProductType > produces ()
 
auto produces () noexcept
 
ProducesCollector producesCollector ()
 

Detailed Description

This class demonstrates a global EDProducer that

Definition at line 22 of file TestAlpakaGlobalProducerE.cc.

Constructor & Destructor Documentation

◆ TestAlpakaGlobalProducerE()

ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaGlobalProducerE::TestAlpakaGlobalProducerE ( edm::ParameterSet const &  config)
inline

Definition at line 24 of file TestAlpakaGlobalProducerE.cc.

References edm::ProducerBase< edm::global::EDProducer, Args... >::produces().

25  : esToken_(esConsumes(config.getParameter<edm::ESInputTag>("eventSetupSource"))),
26  getToken_(consumes(config.getParameter<edm::InputTag>("source"))),
27  getTokenMulti2_(consumes(config.getParameter<edm::InputTag>("source"))),
28  getTokenMulti3_(consumes(config.getParameter<edm::InputTag>("source"))),
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
const device::EDPutToken< portabletest::TestDeviceCollection > putToken_
const device::EDPutToken< portabletest::TestDeviceMultiCollection3 > putTokenMulti3_
const device::ESGetToken< AlpakaESTestDataEDevice, AlpakaESTestRecordC > esToken_
Definition: config.py:1
const device::EDGetToken< portabletest::TestDeviceMultiCollection2 > getTokenMulti2_
const device::EDPutToken< portabletest::TestDeviceMultiCollection2 > putTokenMulti2_
const device::EDGetToken< portabletest::TestDeviceMultiCollection3 > getTokenMulti3_
auto produces(std::string instanceName) noexcept
declare what type of product will make and with which optional label
const device::EDGetToken< portabletest::TestDeviceCollection > getToken_

Member Function Documentation

◆ fillDescriptions()

static void ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaGlobalProducerE::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
inlinestatic

Definition at line 49 of file TestAlpakaGlobalProducerE.cc.

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

49  {
51  desc.add("eventSetupSource", edm::ESInputTag{});
52  desc.add("source", edm::InputTag{});
53 
54  descriptions.addWithDefaultLabel(desc);
55  }
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)

◆ produce()

void ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaGlobalProducerE::produce ( edm::StreamID  ,
device::Event iEvent,
device::EventSetup const &  iSetup 
) const
inlineoverridevirtual

Implements ALPAKA_ACCELERATOR_NAMESPACE::global::EDProducer<>.

Definition at line 33 of file TestAlpakaGlobalProducerE.cc.

References algo_, esToken_, ALPAKA_ACCELERATOR_NAMESPACE::device::EventSetup::getData(), getToken_, getTokenMulti2_, getTokenMulti3_, iEvent, input, eostools::move(), putToken_, putTokenMulti2_, putTokenMulti3_, ALPAKA_ACCELERATOR_NAMESPACE::TestAlgo::update(), ALPAKA_ACCELERATOR_NAMESPACE::TestAlgo::updateMulti2(), and ALPAKA_ACCELERATOR_NAMESPACE::TestAlgo::updateMulti3().

33  {
34  auto const& esData = iSetup.getData(esToken_);
35  auto const& input = iEvent.get(getToken_);
36  auto const& inputMulti2 = iEvent.get(getTokenMulti2_);
37  auto const& inputMulti3 = iEvent.get(getTokenMulti3_);
38 
39  // run the algorithm, potentially asynchronously
40  auto deviceProduct = algo_.update(iEvent.queue(), input, esData);
41  auto deviceProductMulti2 = algo_.updateMulti2(iEvent.queue(), inputMulti2, esData);
42  auto deviceProductMulti3 = algo_.updateMulti3(iEvent.queue(), inputMulti3, esData);
43 
44  iEvent.emplace(putToken_, std::move(deviceProduct));
45  iEvent.emplace(putTokenMulti2_, std::move(deviceProductMulti2));
46  iEvent.emplace(putTokenMulti3_, std::move(deviceProductMulti3));
47  }
const device::EDPutToken< portabletest::TestDeviceCollection > putToken_
const device::EDPutToken< portabletest::TestDeviceMultiCollection3 > putTokenMulti3_
const device::ESGetToken< AlpakaESTestDataEDevice, AlpakaESTestRecordC > esToken_
const device::EDGetToken< portabletest::TestDeviceMultiCollection2 > getTokenMulti2_
portabletest::TestDeviceCollection update(Queue &queue, portabletest::TestDeviceCollection const &input, AlpakaESTestDataEDevice const &esData) const
static std::string const input
Definition: EdmProvDump.cc:50
int iEvent
Definition: GenABIO.cc:224
portabletest::TestDeviceMultiCollection2 updateMulti2(Queue &queue, portabletest::TestDeviceMultiCollection2 const &input, AlpakaESTestDataEDevice const &esData) const
const device::EDPutToken< portabletest::TestDeviceMultiCollection2 > putTokenMulti2_
const device::EDGetToken< portabletest::TestDeviceMultiCollection3 > getTokenMulti3_
portabletest::TestDeviceMultiCollection3 updateMulti3(Queue &queue, portabletest::TestDeviceMultiCollection3 const &input, AlpakaESTestDataEDevice const &esData) const
const device::EDGetToken< portabletest::TestDeviceCollection > getToken_
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ algo_

TestAlgo ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaGlobalProducerE::algo_
private

Definition at line 67 of file TestAlpakaGlobalProducerE.cc.

Referenced by produce().

◆ esToken_

const device::ESGetToken<AlpakaESTestDataEDevice, AlpakaESTestRecordC> ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaGlobalProducerE::esToken_
private

Definition at line 58 of file TestAlpakaGlobalProducerE.cc.

Referenced by produce().

◆ getToken_

const device::EDGetToken<portabletest::TestDeviceCollection> ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaGlobalProducerE::getToken_
private

Definition at line 59 of file TestAlpakaGlobalProducerE.cc.

Referenced by produce().

◆ getTokenMulti2_

const device::EDGetToken<portabletest::TestDeviceMultiCollection2> ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaGlobalProducerE::getTokenMulti2_
private

Definition at line 60 of file TestAlpakaGlobalProducerE.cc.

Referenced by produce().

◆ getTokenMulti3_

const device::EDGetToken<portabletest::TestDeviceMultiCollection3> ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaGlobalProducerE::getTokenMulti3_
private

Definition at line 61 of file TestAlpakaGlobalProducerE.cc.

Referenced by produce().

◆ putToken_

const device::EDPutToken<portabletest::TestDeviceCollection> ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaGlobalProducerE::putToken_
private

Definition at line 62 of file TestAlpakaGlobalProducerE.cc.

Referenced by produce().

◆ putTokenMulti2_

const device::EDPutToken<portabletest::TestDeviceMultiCollection2> ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaGlobalProducerE::putTokenMulti2_
private

Definition at line 63 of file TestAlpakaGlobalProducerE.cc.

Referenced by produce().

◆ putTokenMulti3_

const device::EDPutToken<portabletest::TestDeviceMultiCollection3> ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaGlobalProducerE::putTokenMulti3_
private

Definition at line 64 of file TestAlpakaGlobalProducerE.cc.

Referenced by produce().