4 #include <alpaka/alpaka.hpp> 18 using namespace particleFlowRecHitProducer;
20 template <
typename CAL>
25 pfRecHitsToken_(produces()),
26 synchronise_(
config.getUntrackedParameter<
bool>(
"synchronise")) {
27 const std::vector<edm::ParameterSet>
producers =
config.getParameter<std::vector<edm::ParameterSet>>(
"producers");
36 const typename CAL::TopologyTypeDevice&
topology =
setup.getData(topologyToken_);
38 uint32_t num_recHits = 0;
39 for (
const auto&
token : recHitsToken_)
40 num_recHits +=
event.get(
token.first)->metadata().size();
44 if (num_recHits != 0) {
46 for (
const auto&
token : recHitsToken_)
63 std::vector<edm::ParameterSet> producersDefault(1);
66 desc.addVPSet(
"producers",
producers, producersDefault)->setComment(
"List of inputs and quality cuts");
68 desc.addUntracked<
bool>(
"synchronise",
false)
69 ->setComment(
"Add synchronisation point after execution (for benchmarking asynchronous execution)");
75 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