4 #include <alpaka/alpaka.hpp> 18 using namespace particleFlowRecHitProducer;
20 template <
typename CAL>
25 pfRecHitsToken_(produces()),
26 synchronise_(
config.getUntrackedParameter<
bool>(
"synchronise")) {
28 #ifdef ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED 29 producesTemporarily(
"edm::DeviceProduct<alpaka_cuda_async::reco::PFRecHitDeviceCollection>");
32 const std::vector<edm::ParameterSet>
producers =
config.getParameter<std::vector<edm::ParameterSet>>(
"producers");
41 const typename CAL::TopologyTypeDevice&
topology =
setup.getData(topologyToken_);
43 uint32_t num_recHits = 0;
44 for (
const auto&
token : recHitsToken_)
45 num_recHits +=
event.get(
token.first)->metadata().size();
49 if (num_recHits != 0) {
51 for (
const auto&
token : recHitsToken_)
68 std::vector<edm::ParameterSet> producersDefault(1);
71 desc.addVPSet(
"producers",
producers, producersDefault)->setComment(
"List of inputs and quality cuts");
73 desc.addUntracked<
bool>(
"synchronise",
false)
74 ->setComment(
"Add synchronisation point after execution (for benchmarking asynchronous execution)");
80 std::vector<std::pair<device::EDGetToken<typename CAL::CaloRecHitSoATypeDevice>,
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
PortableCollection<::reco::PFRecHitSoA > PFRecHitDeviceCollection
const device::EDPutToken< reco::PFRecHitDeviceCollection > pfRecHitsToken_
PFRecHitSoAProducer< HCAL > PFRecHitSoAProducerHCAL
void produce(edm::StreamID, device::Event &event, const device::EventSetup &setup) const override
const device::ESGetToken< typename CAL::TopologyTypeDevice, typename CAL::TopologyRecordType > topologyToken_
PFRecHitSoAProducer(edm::ParameterSet const &config)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void processRecHits(Queue &queue, const typename CAL::CaloRecHitSoATypeDevice &recHits, const typename CAL::ParameterType ¶ms, const typename CAL::TopologyTypeDevice &topology, reco::PFRecHitDeviceCollection &pfRecHits)
#define DEFINE_FWK_ALPAKA_MODULE(name)
std::vector< std::pair< device::EDGetToken< typename CAL::CaloRecHitSoATypeDevice >, device::ESGetToken< typename CAL::ParameterType, typename CAL::ParameterRecordType > > > recHitsToken_
PFRecHitSoAProducer< ECAL > PFRecHitSoAProducerECAL