From 51c270a1574950d6bf73d80a2412df21434786ec Mon Sep 17 00:00:00 2001 From: Ivan Razumov Date: Wed, 10 Apr 2024 16:16:51 +0200 Subject: [PATCH] Do not include EventSetup record definitions in device code --- DataFormats/TrackSoA/interface/TrackDefinitions.h | 1 + .../plugins/alpaka/CalorimeterDefinitions.h | 8 ++++++-- .../plugins/alpaka/PFRecHitSoAProducer.cc | 4 +++- .../plugins/alpaka/PFRecHitTopologyESProducer.cc | 5 ++++- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/DataFormats/TrackSoA/interface/TrackDefinitions.h b/DataFormats/TrackSoA/interface/TrackDefinitions.h index 6bd36b5bd3cd1..c1b84c47ec6e4 100644 --- a/DataFormats/TrackSoA/interface/TrackDefinitions.h +++ b/DataFormats/TrackSoA/interface/TrackDefinitions.h @@ -3,6 +3,7 @@ #include #include #include +#include namespace pixelTrack { diff --git a/RecoParticleFlow/PFRecHitProducer/plugins/alpaka/CalorimeterDefinitions.h b/RecoParticleFlow/PFRecHitProducer/plugins/alpaka/CalorimeterDefinitions.h index 7646dd163809f..58998bf72a54f 100644 --- a/RecoParticleFlow/PFRecHitProducer/plugins/alpaka/CalorimeterDefinitions.h +++ b/RecoParticleFlow/PFRecHitProducer/plugins/alpaka/CalorimeterDefinitions.h @@ -9,12 +9,16 @@ #include "DataFormats/HcalRecHit/interface/HBHERecHit.h" #include "DataFormats/ParticleFlowReco/interface/CaloRecHitHostCollection.h" #include "DataFormats/ParticleFlowReco/interface/alpaka/CaloRecHitDeviceCollection.h" -#include "RecoParticleFlow/PFRecHitProducer/interface/PFRecHitParamsRecord.h" #include "RecoParticleFlow/PFRecHitProducer/interface/PFRecHitTopologyHostCollection.h" -#include "RecoParticleFlow/PFRecHitProducer/interface/PFRecHitTopologyRecord.h" #include "RecoParticleFlow/PFRecHitProducer/interface/alpaka/PFRecHitParamsDeviceCollection.h" #include "RecoParticleFlow/PFRecHitProducer/interface/alpaka/PFRecHitTopologyDeviceCollection.h" +// Forward declaration of EventSetup records, to avoid propagating the dependency on framework headers to device code +class PFRecHitHCALParamsRecord; +class PFRecHitHCALTopologyRecord; +class EcalPFRecHitThresholdsRcd; +class PFRecHitECALTopologyRecord; + // This file defines two structs: // 1) ALPAKA_ACCELERATOR_NAMESPACE::particleFlowRecHitProducer::HCAL // 2) ALPAKA_ACCELERATOR_NAMESPACE::particleFlowRecHitProducer::ECAL diff --git a/RecoParticleFlow/PFRecHitProducer/plugins/alpaka/PFRecHitSoAProducer.cc b/RecoParticleFlow/PFRecHitProducer/plugins/alpaka/PFRecHitSoAProducer.cc index af3df8a442333..31257659062f8 100644 --- a/RecoParticleFlow/PFRecHitProducer/plugins/alpaka/PFRecHitSoAProducer.cc +++ b/RecoParticleFlow/PFRecHitProducer/plugins/alpaka/PFRecHitSoAProducer.cc @@ -8,8 +8,10 @@ #include "FWCore/ParameterSet/interface/ParameterSetDescription.h" #include "FWCore/Utilities/interface/InputTag.h" #include "HeterogeneousCore/AlpakaCore/interface/alpaka/global/EDProducer.h" -#include "CalorimeterDefinitions.h" +#include "RecoParticleFlow/PFRecHitProducer/interface/PFRecHitParamsRecord.h" +#include "RecoParticleFlow/PFRecHitProducer/interface/PFRecHitTopologyRecord.h" +#include "CalorimeterDefinitions.h" #include "PFRecHitProducerKernel.h" namespace ALPAKA_ACCELERATOR_NAMESPACE { diff --git a/RecoParticleFlow/PFRecHitProducer/plugins/alpaka/PFRecHitTopologyESProducer.cc b/RecoParticleFlow/PFRecHitProducer/plugins/alpaka/PFRecHitTopologyESProducer.cc index 33abb62375707..eccaaf520ae16 100644 --- a/RecoParticleFlow/PFRecHitProducer/plugins/alpaka/PFRecHitTopologyESProducer.cc +++ b/RecoParticleFlow/PFRecHitProducer/plugins/alpaka/PFRecHitTopologyESProducer.cc @@ -4,9 +4,9 @@ #include #include -#include "DataFormats/EcalDetId/interface/EcalSubdetector.h" #include "CondFormats/DataRecord/interface/HcalPFCutsRcd.h" #include "CondTools/Hcal/interface/HcalPFCutsHandler.h" +#include "DataFormats/EcalDetId/interface/EcalSubdetector.h" #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/ParameterSet/interface/ParameterSetDescription.h" @@ -18,6 +18,9 @@ #include "Geometry/Records/interface/CaloGeometryRecord.h" #include "Geometry/Records/interface/HcalRecNumberingRecord.h" #include "HeterogeneousCore/AlpakaCore/interface/alpaka/ESProducer.h" +#include "RecoParticleFlow/PFRecHitProducer/interface/PFRecHitParamsRecord.h" +#include "RecoParticleFlow/PFRecHitProducer/interface/PFRecHitTopologyRecord.h" + #include "CalorimeterDefinitions.h" namespace ALPAKA_ACCELERATOR_NAMESPACE {