CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaStreamSynchronizingProducer Class Reference
Inheritance diagram for ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaStreamSynchronizingProducer:
ALPAKA_ACCELERATOR_NAMESPACE::stream::SynchronizingEDProducer<> ALPAKA_ACCELERATOR_NAMESPACE::ProducerBase< edm::stream::EDProducer, edm::ExternalWork, Args... > edm::stream::EDProducer< Args..., edm::Transformer >

Public Member Functions

void acquire (device::Event const &iEvent, device::EventSetup const &iSetup) override
 
void produce (device::Event &iEvent, device::EventSetup const &iSetup) override
 
 TestAlpakaStreamSynchronizingProducer (edm::ParameterSet const &iConfig)
 
- Public Member Functions inherited from ALPAKA_ACCELERATOR_NAMESPACE::stream::SynchronizingEDProducer<>
void acquire (edm::Event const &iEvent, edm::EventSetup const &iSetup, edm::WaitingTaskWithArenaHolder holder) final
 
void produce (edm::Event &iEvent, edm::EventSetup const &iSetup) final
 
- Public Member Functions inherited from ALPAKA_ACCELERATOR_NAMESPACE::ProducerBase< edm::stream::EDProducer, edm::ExternalWork, Args... >
auto produces () noexcept
 
auto produces (std::string instanceName) noexcept
 
- Public Member Functions inherited from edm::stream::EDProducer< Args..., edm::Transformer >
 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)
 
- Static Public Member Functions inherited from ALPAKA_ACCELERATOR_NAMESPACE::ProducerBase< edm::stream::EDProducer, edm::ExternalWork, Args... >
static void prevalidate (edm::ConfigurationDescriptions &descriptions)
 

Private Attributes

const device::ESGetToken< AlpakaESTestDataDDevice, AlpakaESTestRecordDesTokenDevice_
 
int const expectedInt_
 
TestHelperClass helper_
 
cms::alpakatest::TestHostOnlyHelperClass const hostHelper_
 
const edm::EDPutTokenT< portabletest::TestHostCollectionputToken_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer< Args..., edm::Transformer >
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

This class demonstrates a stream EDProducer that

Definition at line 25 of file TestAlpakaStreamSynchronizingProducer.cc.

Constructor & Destructor Documentation

◆ TestAlpakaStreamSynchronizingProducer()

ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaStreamSynchronizingProducer::TestAlpakaStreamSynchronizingProducer ( edm::ParameterSet const &  iConfig)
inline

Definition at line 27 of file TestAlpakaStreamSynchronizingProducer.cc.

References ALPAKA_ACCELERATOR_NAMESPACE::ProducerBase< edm::stream::EDProducer, edm::ExternalWork, Args... >::produces().

30  helper_{iConfig, consumesCollector()},
31  hostHelper_{iConfig, consumesCollector()},
32  expectedInt_{iConfig.getParameter<int>("expectedInt")} {}
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
const device::ESGetToken< AlpakaESTestDataDDevice, AlpakaESTestRecordD > esTokenDevice_

Member Function Documentation

◆ acquire()

void ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaStreamSynchronizingProducer::acquire ( device::Event const &  iEvent,
device::EventSetup const &  iSetup 
)
inlineoverridevirtual

Implements ALPAKA_ACCELERATOR_NAMESPACE::stream::SynchronizingEDProducer<>.

Definition at line 34 of file TestAlpakaStreamSynchronizingProducer.cc.

References esTokenDevice_, Exception, expectedInt_, ALPAKA_ACCELERATOR_NAMESPACE::device::EventSetup::getData(), helper_, hostHelper_, iEvent, ALPAKA_ACCELERATOR_NAMESPACE::TestHelperClass::makeAsync(), cms::alpakatest::TestHostOnlyHelperClass::run(), and relativeConstraints::value.

34  {
35  [[maybe_unused]] auto const& esData = iSetup.getData(esTokenDevice_);
36 
37  int const value = hostHelper_.run(iEvent, iSetup);
38  if (value != expectedInt_) {
39  throw cms::Exception("Assert") << "Expected value " << expectedInt_ << ", but got " << value;
40  }
41 
42  helper_.makeAsync(iEvent, iSetup);
43  }
void makeAsync(device::Event const &iEvent, device::EventSetup const &iSetup)
const device::ESGetToken< AlpakaESTestDataDDevice, AlpakaESTestRecordD > esTokenDevice_
int iEvent
Definition: GenABIO.cc:224
int run(edm::Event const &iEvent, edm::EventSetup const &iSetup) const
Definition: value.py:1

◆ fillDescriptions()

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

◆ produce()

void ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaStreamSynchronizingProducer::produce ( device::Event iEvent,
device::EventSetup const &  iSetup 
)
inlineoverridevirtual

Member Data Documentation

◆ esTokenDevice_

const device::ESGetToken<AlpakaESTestDataDDevice, AlpakaESTestRecordD> ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaStreamSynchronizingProducer::esTokenDevice_
private

Definition at line 58 of file TestAlpakaStreamSynchronizingProducer.cc.

Referenced by acquire().

◆ expectedInt_

int const ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaStreamSynchronizingProducer::expectedInt_
private

Definition at line 63 of file TestAlpakaStreamSynchronizingProducer.cc.

Referenced by acquire().

◆ helper_

TestHelperClass ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaStreamSynchronizingProducer::helper_
private

Definition at line 61 of file TestAlpakaStreamSynchronizingProducer.cc.

Referenced by acquire(), and produce().

◆ hostHelper_

cms::alpakatest::TestHostOnlyHelperClass const ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaStreamSynchronizingProducer::hostHelper_
private

Definition at line 62 of file TestAlpakaStreamSynchronizingProducer.cc.

Referenced by acquire().

◆ putToken_

const edm::EDPutTokenT<portabletest::TestHostCollection> ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaStreamSynchronizingProducer::putToken_
private

Definition at line 59 of file TestAlpakaStreamSynchronizingProducer.cc.

Referenced by produce().