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 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")) {
29  // Workaround until the ProductID problem in issue https://github.com/cms-sw/cmssw/issues/44643 is fixed
30 #ifdef ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED
31  producesTemporarily("edm::DeviceProduct<alpaka_cuda_async::reco::PFClusterDeviceCollection>");
32  producesTemporarily("edm::DeviceProduct<alpaka_cuda_async::reco::PFRecHitFractionDeviceCollection>");
33 #endif
34  }
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 68 of file PFClusterSoAProducer.cc.

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

68  {
70  desc.add<edm::InputTag>("pfRecHits", edm::InputTag(""));
71  desc.add<edm::ESInputTag>("pfClusterParams", edm::ESInputTag(""));
72  desc.add<edm::ESInputTag>("topology", edm::ESInputTag(""));
73  desc.add<bool>("synchronise", false);
74  desc.add<int>("pfRecHitFractionAllocation", 120);
75  descriptions.addWithDefaultLabel(desc);
76  }
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 36 of file PFClusterSoAProducer.cc.

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

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

Referenced by produce().

◆ outputPFClusterSoA_Token_

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

Definition at line 82 of file PFClusterSoAProducer.cc.

Referenced by produce().

◆ outputPFRHFractionSoA_Token_

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

Definition at line 83 of file PFClusterSoAProducer.cc.

Referenced by produce().

◆ pfClusParamsToken

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

Definition at line 79 of file PFClusterSoAProducer.cc.

Referenced by produce().

◆ pfRecHitFractionAllocation_

const int ALPAKA_ACCELERATOR_NAMESPACE::PFClusterSoAProducer::pfRecHitFractionAllocation_
private

Definition at line 85 of file PFClusterSoAProducer.cc.

Referenced by produce().

◆ synchronise_

const bool ALPAKA_ACCELERATOR_NAMESPACE::PFClusterSoAProducer::synchronise_
private

Definition at line 84 of file PFClusterSoAProducer.cc.

Referenced by produce().

◆ topologyToken_

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

Definition at line 80 of file PFClusterSoAProducer.cc.

Referenced by produce().