4 #include <alpaka/alpaka.hpp> 16 using namespace particleFlowRecHitProducer;
18 template <
typename CAL>
23 pfRecHitsToken_(produces()),
24 synchronise_(
config.getUntrackedParameter<
bool>(
"synchronise")) {
26 #ifdef ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED 27 producesTemporarily(
"edm::DeviceProduct<alpaka_cuda_async::reco::PFRecHitDeviceCollection>");
30 const std::vector<edm::ParameterSet>
producers =
config.getParameter<std::vector<edm::ParameterSet>>(
"producers");
39 const typename CAL::TopologyTypeDevice&
topology =
setup.getData(topologyToken_);
41 uint32_t num_recHits = 0;
42 for (
const auto&
token : recHitsToken_)
43 num_recHits +=
event.get(
token.first)->metadata().size();
47 if (num_recHits != 0) {
49 for (
const auto&
token : recHitsToken_)
66 std::vector<edm::ParameterSet> producersDefault(1);
69 desc.addVPSet(
"producers",
producers, producersDefault)->setComment(
"List of inputs and quality cuts");
71 desc.addUntracked<
bool>(
"synchronise",
false)
72 ->setComment(
"Add synchronisation point after execution (for benchmarking asynchronous execution)");
78 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