CMS 3D CMS Logo

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

Public Member Functions

void acquire (edm::Event const &, edm::EventSetup const &, edm::WaitingTaskWithArenaHolder) override
 
 EERecHitGPUtoSoA (const edm::ParameterSet &ps)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~EERecHitGPUtoSoA () override
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::ExternalWork >
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Private Attributes

cms::cuda::ContextState ctxState_
 
std::unique_ptr< HGCRecHitCPUProductprodPtr_
 
edm::EDPutTokenT< HGCRecHitCPUProductrecHitCPUSoAToken_
 
edm::EDGetTokenT< cms::cuda::Product< HGCRecHitGPUProduct > > recHitGPUToken_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer< edm::ExternalWork >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Definition at line 35 of file EERecHitGPUtoSoA.cc.

Constructor & Destructor Documentation

◆ EERecHitGPUtoSoA()

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

Definition at line 51 of file EERecHitGPUtoSoA.cc.

52  : recHitGPUToken_{consumes<cms::cuda::Product<HGCRecHitGPUProduct>>(
53  ps.getParameter<edm::InputTag>("EERecHitGPUTok"))},
54  recHitCPUSoAToken_(produces<HGCRecHitCPUProduct>()) {}

References edm::ParameterSet::getParameter().

◆ ~EERecHitGPUtoSoA()

EERecHitGPUtoSoA::~EERecHitGPUtoSoA ( )
override

Definition at line 56 of file EERecHitGPUtoSoA.cc.

56 {}

Member Function Documentation

◆ acquire()

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

Definition at line 58 of file EERecHitGPUtoSoA.cc.

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  HGCRecHitCPUProduct& prod_ = *prodPtr_;
67  KernelManagerHGCalRecHit km(prod_.get(), gpuRecHits.get());
68  km.transfer_soa_to_host(ctx.stream());
69 }

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

◆ produce()

void EERecHitGPUtoSoA::produce ( edm::Event event,
const edm::EventSetup setup 
)
override

Definition at line 71 of file EERecHitGPUtoSoA.cc.

71 { event.put(std::move(prodPtr_)); }

References eostools::move(), and prodPtr_.

Member Data Documentation

◆ ctxState_

cms::cuda::ContextState EERecHitGPUtoSoA::ctxState_
private

Definition at line 44 of file EERecHitGPUtoSoA.cc.

◆ prodPtr_

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

Definition at line 48 of file EERecHitGPUtoSoA.cc.

Referenced by acquire(), and produce().

◆ recHitCPUSoAToken_

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

Definition at line 46 of file EERecHitGPUtoSoA.cc.

◆ recHitGPUToken_

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

Definition at line 45 of file EERecHitGPUtoSoA.cc.

Referenced by acquire().

HGCRecHitCPUProduct
Definition: HGCRecHitCPUProduct.h:12
EERecHitGPUtoSoA::prodPtr_
std::unique_ptr< HGCRecHitCPUProduct > prodPtr_
Definition: EERecHitGPUtoSoA.cc:48
KernelManagerHGCalRecHit
Definition: KernelManagerHGCalRecHit.h:33
EERecHitGPUtoSoA::recHitGPUToken_
edm::EDGetTokenT< cms::cuda::Product< HGCRecHitGPUProduct > > recHitGPUToken_
Definition: EERecHitGPUtoSoA.cc:45
EERecHitGPUtoSoA::recHitCPUSoAToken_
edm::EDPutTokenT< HGCRecHitCPUProduct > recHitCPUSoAToken_
Definition: EERecHitGPUtoSoA.cc:46
w
const double w
Definition: UKUtility.cc:23
KernelManagerHGCalRecHit::transfer_soa_to_host
void transfer_soa_to_host(const cudaStream_t &)
cms::cuda::ScopedContextAcquire
Definition: ScopedContext.h:101
eostools.move
def move(src, dest)
Definition: eostools.py:511
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
event
Definition: event.py:1
edm::InputTag
Definition: InputTag.h:15