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<> 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<>
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 19 of file PFClusterSoAProducer.cc.

Constructor & Destructor Documentation

◆ PFClusterSoAProducer()

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

Definition at line 21 of file PFClusterSoAProducer.cc.

22  : pfClusParamsToken(esConsumes(config.getParameter<edm::ESInputTag>("pfClusterParams"))),
23  topologyToken_(esConsumes(config.getParameter<edm::ESInputTag>("topology"))),
24  inputPFRecHitSoA_Token_{consumes(config.getParameter<edm::InputTag>("pfRecHits"))},
27  synchronise_(config.getParameter<bool>("synchronise")),
28  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 62 of file PFClusterSoAProducer.cc.

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

62  {
64  desc.add<edm::InputTag>("pfRecHits", edm::InputTag(""));
65  desc.add<edm::ESInputTag>("pfClusterParams", edm::ESInputTag(""));
66  desc.add<edm::ESInputTag>("topology", edm::ESInputTag(""));
67  desc.add<bool>("synchronise", false);
68  desc.add<int>("pfRecHitFractionAllocation", 120);
69  descriptions.addWithDefaultLabel(desc);
70  }
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<>.

Definition at line 30 of file PFClusterSoAProducer.cc.

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

30  {
34  int nRH = 0;
35  if (pfRecHits->metadata().size() != 0)
36  nRH = pfRecHits->size();
37 
38  reco::PFClusteringVarsDeviceCollection pfClusteringVars{nRH, event.queue()};
39  reco::PFClusteringEdgeVarsDeviceCollection pfClusteringEdgeVars{(nRH * 8), event.queue()};
40  reco::PFClusterDeviceCollection pfClusters{nRH, event.queue()};
41  reco::PFRecHitFractionDeviceCollection pfrhFractions{nRH * pfRecHitFractionAllocation_, event.queue()};
42 
43  if (nRH != 0) {
44  PFClusterProducerKernel kernel(event.queue(), pfRecHits);
45  kernel.execute(event.queue(),
46  params,
47  topology,
48  pfClusteringVars,
49  pfClusteringEdgeVars,
50  pfRecHits,
51  pfClusters,
52  pfrhFractions);
53  }
54 
55  if (synchronise_)
56  alpaka::wait(event.queue());
57 
58  event.emplace(outputPFClusterSoA_Token_, std::move(pfClusters));
59  event.emplace(outputPFRHFractionSoA_Token_, std::move(pfrhFractions));
60  }
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 75 of file PFClusterSoAProducer.cc.

Referenced by produce().

◆ outputPFClusterSoA_Token_

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

Definition at line 76 of file PFClusterSoAProducer.cc.

Referenced by produce().

◆ outputPFRHFractionSoA_Token_

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

Definition at line 77 of file PFClusterSoAProducer.cc.

Referenced by produce().

◆ pfClusParamsToken

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

Definition at line 73 of file PFClusterSoAProducer.cc.

Referenced by produce().

◆ pfRecHitFractionAllocation_

const int ALPAKA_ACCELERATOR_NAMESPACE::PFClusterSoAProducer::pfRecHitFractionAllocation_
private

Definition at line 79 of file PFClusterSoAProducer.cc.

Referenced by produce().

◆ synchronise_

const bool ALPAKA_ACCELERATOR_NAMESPACE::PFClusterSoAProducer::synchronise_
private

Definition at line 78 of file PFClusterSoAProducer.cc.

Referenced by produce().

◆ topologyToken_

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

Definition at line 74 of file PFClusterSoAProducer.cc.

Referenced by produce().