CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
HEFRecHitGPUtoSoA Class Reference
Inheritance diagram for HEFRecHitGPUtoSoA:
edm::stream::EDProducer< edm::ExternalWork >

Public Member Functions

void acquire (edm::Event const &, edm::EventSetup const &, edm::WaitingTaskWithArenaHolder) override
 
 HEFRecHitGPUtoSoA (const edm::ParameterSet &ps)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~HEFRecHitGPUtoSoA () override
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::ExternalWork >
 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
 

Private Attributes

cms::cuda::ContextState ctxState_
 
std::unique_ptr
< HGCRecHitCPUProduct
prodPtr_
 
edm::EDPutTokenT
< HGCRecHitCPUProduct
recHitCPUSoAToken_
 
edm::EDGetTokenT
< cms::cuda::Product
< HGCRecHitGPUProduct > > 
recHitGPUToken_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer< edm::ExternalWork >
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 35 of file HEFRecHitGPUtoSoA.cc.

Constructor & Destructor Documentation

HEFRecHitGPUtoSoA::HEFRecHitGPUtoSoA ( const edm::ParameterSet ps)
explicit

Definition at line 51 of file HEFRecHitGPUtoSoA.cc.

References edm::ParameterSet::getParameter().

52  : recHitGPUToken_{consumes<cms::cuda::Product<HGCRecHitGPUProduct>>(
53  ps.getParameter<edm::InputTag>("HEFRecHitGPUTok"))},
54  recHitCPUSoAToken_(produces<HGCRecHitCPUProduct>()) {}
edm::EDPutTokenT< HGCRecHitCPUProduct > recHitCPUSoAToken_
edm::EDGetTokenT< cms::cuda::Product< HGCRecHitGPUProduct > > recHitGPUToken_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
HEFRecHitGPUtoSoA::~HEFRecHitGPUtoSoA ( )
override

Definition at line 56 of file HEFRecHitGPUtoSoA.cc.

56 {}

Member Function Documentation

void HEFRecHitGPUtoSoA::acquire ( edm::Event const &  event,
edm::EventSetup const &  setup,
edm::WaitingTaskWithArenaHolder  w 
)
override

Definition at line 58 of file HEFRecHitGPUtoSoA.cc.

References eostools::move(), prodPtr_, recHitGPUToken_, and KernelManagerHGCalRecHit::transfer_soa_to_host().

60  {
61  cms::cuda::ScopedContextAcquire ctx{event.streamID(), std::move(w)};
62  const auto& gpuRecHits = ctx.get(event, recHitGPUToken_);
63 
64  prodPtr_ = std::make_unique<HGCRecHitCPUProduct>(gpuRecHits.nHits(), ctx.stream());
65 
66  KernelManagerHGCalRecHit km((*prodPtr_).get(), gpuRecHits.get());
67  km.transfer_soa_to_host(ctx.stream());
68 }
std::unique_ptr< HGCRecHitCPUProduct > prodPtr_
def move
Definition: eostools.py:511
edm::EDGetTokenT< cms::cuda::Product< HGCRecHitGPUProduct > > recHitGPUToken_
void transfer_soa_to_host(const cudaStream_t &)
void HEFRecHitGPUtoSoA::produce ( edm::Event event,
const edm::EventSetup setup 
)
override

Definition at line 70 of file HEFRecHitGPUtoSoA.cc.

References eostools::move(), and prodPtr_.

70 { event.put(std::move(prodPtr_)); }
std::unique_ptr< HGCRecHitCPUProduct > prodPtr_
def move
Definition: eostools.py:511

Member Data Documentation

cms::cuda::ContextState HEFRecHitGPUtoSoA::ctxState_
private

Definition at line 44 of file HEFRecHitGPUtoSoA.cc.

std::unique_ptr<HGCRecHitCPUProduct> HEFRecHitGPUtoSoA::prodPtr_
private

Definition at line 48 of file HEFRecHitGPUtoSoA.cc.

Referenced by acquire(), and produce().

edm::EDPutTokenT<HGCRecHitCPUProduct> HEFRecHitGPUtoSoA::recHitCPUSoAToken_
private

Definition at line 46 of file HEFRecHitGPUtoSoA.cc.

edm::EDGetTokenT<cms::cuda::Product<HGCRecHitGPUProduct> > HEFRecHitGPUtoSoA::recHitGPUToken_
private

Definition at line 45 of file HEFRecHitGPUtoSoA.cc.

Referenced by acquire().