CMS 3D CMS Logo

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

Public Member Functions

 PFClusterSoAProducer (edm::ParameterSet const &config)
 
void produce (device::Event &event, device::EventSetup const &setup) override
 
- Public Member Functions inherited from ALPAKA_ACCELERATOR_NAMESPACE::stream::EDProducer< Args >
void produce (edm::Event &iEvent, edm::EventSetup const &iSetup) final
 
- Public Member Functions inherited from edm::ProducerBase< edm::stream::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

const edm::EDGetTokenT< reco::PFRecHitHostCollectioninputPFRecHitSoA_Token_
 
const device::EDPutToken< reco::PFClusterDeviceCollectionoutputPFClusterSoA_Token_
 
const device::EDPutToken< reco::PFRecHitFractionDeviceCollectionoutputPFRHFractionSoA_Token_
 
const device::ESGetToken< reco::PFClusterParamsDeviceCollection, JobConfigurationGPURecordpfClusParamsToken
 
const int pfRecHitFractionAllocation_
 
const bool synchronise_
 
const device::ESGetToken< reco::PFRecHitHCALTopologyDeviceCollection, PFRecHitHCALTopologyRecordtopologyToken_
 

Additional Inherited Members

- Public Types inherited from edm::ProducerBase< edm::stream::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::stream::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

Definition at line 17 of file PFClusterSoAProducer.cc.

Constructor & Destructor Documentation

◆ PFClusterSoAProducer()

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

Definition at line 19 of file PFClusterSoAProducer.cc.

20  : pfClusParamsToken(esConsumes(config.getParameter<edm::ESInputTag>("pfClusterParams"))),
21  topologyToken_(esConsumes(config.getParameter<edm::ESInputTag>("topology"))),
22  inputPFRecHitSoA_Token_{consumes(config.getParameter<edm::InputTag>("pfRecHits"))},
25  synchronise_(config.getParameter<bool>("synchronise")),
26  pfRecHitFractionAllocation_(config.getParameter<int>("pfRecHitFractionAllocation")) {}
const device::ESGetToken< reco::PFRecHitHCALTopologyDeviceCollection, PFRecHitHCALTopologyRecord > topologyToken_
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
const edm::EDGetTokenT< reco::PFRecHitHostCollection > inputPFRecHitSoA_Token_
Definition: config.py:1
const device::EDPutToken< reco::PFRecHitFractionDeviceCollection > outputPFRHFractionSoA_Token_
const device::EDPutToken< reco::PFClusterDeviceCollection > outputPFClusterSoA_Token_
const device::ESGetToken< reco::PFClusterParamsDeviceCollection, JobConfigurationGPURecord > pfClusParamsToken
auto produces(std::string instanceName) noexcept
declare what type of product will make and with which optional label

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 50 of file PFClusterSoAProducer.cc.

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

50  {
52  desc.add<edm::InputTag>("pfRecHits");
53  desc.add<edm::ESInputTag>("pfClusterParams");
54  desc.add<edm::ESInputTag>("topology");
55  desc.add<bool>("synchronise");
56  desc.add<int>("pfRecHitFractionAllocation", 120);
57  descriptions.addWithDefaultLabel(desc);
58  }
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)

◆ produce()

void ALPAKA_ACCELERATOR_NAMESPACE::PFClusterSoAProducer::produce ( device::Event event,
device::EventSetup const &  setup 
)
inlineoverridevirtual

Implements ALPAKA_ACCELERATOR_NAMESPACE::stream::EDProducer< Args >.

Definition at line 28 of file PFClusterSoAProducer.cc.

References ALPAKA_ACCELERATOR_NAMESPACE::PFClusterProducerKernel::execute(), inputPFRecHitSoA_Token_, eostools::move(), outputPFClusterSoA_Token_, outputPFRHFractionSoA_Token_, submitPVValidationJobs::params, pfClusParamsToken, pfRecHitFractionAllocation_, pfClusterHBHEAlpaka_cff::pfRecHits, singleTopDQM_cfi::setup, synchronise_, pfClusterHBHEAlpaka_cff::topology, topologyToken_, and SequenceTypes::wait().

28  {
32  const int nRH = pfRecHits->size();
33 
34  reco::PFClusteringVarsDeviceCollection pfClusteringVars{nRH, event.queue()};
35  reco::PFClusteringEdgeVarsDeviceCollection pfClusteringEdgeVars{(nRH * 8), event.queue()};
36  reco::PFClusterDeviceCollection pfClusters{nRH, event.queue()};
37  reco::PFRecHitFractionDeviceCollection pfrhFractions{nRH * pfRecHitFractionAllocation_, event.queue()};
38 
39  PFClusterProducerKernel kernel(event.queue(), pfRecHits);
40  kernel.execute(
41  event.queue(), params, topology, pfClusteringVars, pfClusteringEdgeVars, pfRecHits, pfClusters, pfrhFractions);
42 
43  if (synchronise_)
44  alpaka::wait(event.queue());
45 
46  event.emplace(outputPFClusterSoA_Token_, std::move(pfClusters));
47  event.emplace(outputPFRHFractionSoA_Token_, std::move(pfrhFractions));
48  }
const device::ESGetToken< reco::PFRecHitHCALTopologyDeviceCollection, PFRecHitHCALTopologyRecord > topologyToken_
const edm::EDGetTokenT< reco::PFRecHitHostCollection > inputPFRecHitSoA_Token_
const device::EDPutToken< reco::PFRecHitFractionDeviceCollection > outputPFRHFractionSoA_Token_
PortableCollection<::reco::PFClusterSoA > PFClusterDeviceCollection
PortableCollection<::reco::PFClusteringVarsSoA > PFClusteringVarsDeviceCollection
PortableCollection<::reco::PFRecHitHCALTopologySoA > PFRecHitHCALTopologyDeviceCollection
PortableCollection<::reco::PFRecHitFractionSoA > PFRecHitFractionDeviceCollection
PortableCollection<::reco::PFClusterParamsSoA > PFClusterParamsDeviceCollection
const device::EDPutToken< reco::PFClusterDeviceCollection > outputPFClusterSoA_Token_
const device::ESGetToken< reco::PFClusterParamsDeviceCollection, JobConfigurationGPURecord > pfClusParamsToken
PortableCollection<::reco::PFClusteringEdgeVarsSoA > PFClusteringEdgeVarsDeviceCollection
def move(src, dest)
Definition: eostools.py:511
Definition: event.py:1

Member Data Documentation

◆ inputPFRecHitSoA_Token_

const edm::EDGetTokenT<reco::PFRecHitHostCollection> ALPAKA_ACCELERATOR_NAMESPACE::PFClusterSoAProducer::inputPFRecHitSoA_Token_
private

Definition at line 63 of file PFClusterSoAProducer.cc.

Referenced by produce().

◆ outputPFClusterSoA_Token_

const device::EDPutToken<reco::PFClusterDeviceCollection> ALPAKA_ACCELERATOR_NAMESPACE::PFClusterSoAProducer::outputPFClusterSoA_Token_
private

Definition at line 64 of file PFClusterSoAProducer.cc.

Referenced by produce().

◆ outputPFRHFractionSoA_Token_

const device::EDPutToken<reco::PFRecHitFractionDeviceCollection> ALPAKA_ACCELERATOR_NAMESPACE::PFClusterSoAProducer::outputPFRHFractionSoA_Token_
private

Definition at line 65 of file PFClusterSoAProducer.cc.

Referenced by produce().

◆ pfClusParamsToken

const device::ESGetToken<reco::PFClusterParamsDeviceCollection, JobConfigurationGPURecord> ALPAKA_ACCELERATOR_NAMESPACE::PFClusterSoAProducer::pfClusParamsToken
private

Definition at line 61 of file PFClusterSoAProducer.cc.

Referenced by produce().

◆ pfRecHitFractionAllocation_

const int ALPAKA_ACCELERATOR_NAMESPACE::PFClusterSoAProducer::pfRecHitFractionAllocation_
private

Definition at line 67 of file PFClusterSoAProducer.cc.

Referenced by produce().

◆ synchronise_

const bool ALPAKA_ACCELERATOR_NAMESPACE::PFClusterSoAProducer::synchronise_
private

Definition at line 66 of file PFClusterSoAProducer.cc.

Referenced by produce().

◆ topologyToken_

const device::ESGetToken<reco::PFRecHitHCALTopologyDeviceCollection, PFRecHitHCALTopologyRecord> ALPAKA_ACCELERATOR_NAMESPACE::PFClusterSoAProducer::topologyToken_
private

Definition at line 62 of file PFClusterSoAProducer.cc.

Referenced by produce().