From b6b865a0d2491321128f260b27a58b1918ac8c52 Mon Sep 17 00:00:00 2001 From: Cms Build Date: Mon, 6 Apr 2020 16:04:52 +0200 Subject: [PATCH] Apply code formatting fixes from upstream integration (cms-patatrack#445) --- .../EcalDigi/interface/DigisCollection.h | 32 ++-- .../EcalRecHitSoA/interface/RecoTypes.h | 10 +- .../interface/ElectronicsIdGPU.h | 152 +++++++++--------- .../interface/ElectronicsMappingGPU.h | 46 +++--- .../interface/EcalGainRatiosGPU.h | 35 ++-- .../EcalRecAlgos/interface/EcalPedestalsGPU.h | 46 +++--- .../interface/EcalPulseCovariancesGPU.h | 33 ++-- .../interface/EcalPulseShapesGPU.h | 33 ++-- .../interface/EcalSamplesCorrelationGPU.h | 47 +++--- .../interface/EcalTimeBiasCorrectionsGPU.h | 45 +++--- .../interface/EcalTimeCalibConstantsGPU.h | 37 +++-- 11 files changed, 252 insertions(+), 264 deletions(-) diff --git a/CUDADataFormats/EcalDigi/interface/DigisCollection.h b/CUDADataFormats/EcalDigi/interface/DigisCollection.h index 31134e3ddbd8f..865a456cb06e4 100644 --- a/CUDADataFormats/EcalDigi/interface/DigisCollection.h +++ b/CUDADataFormats/EcalDigi/interface/DigisCollection.h @@ -3,27 +3,25 @@ namespace ecal { -// -// this is basically a view -// it does not own the actual memory -> does not reclaim -// -struct DigisCollection { + // + // this is basically a view + // it does not own the actual memory -> does not reclaim + // + struct DigisCollection { DigisCollection() = default; - DigisCollection(uint32_t *ids, uint16_t *data, uint32_t ndigis) - : ids{ids}, data{data}, ndigis{ndigis} - {} - DigisCollection(DigisCollection const&) = default; - DigisCollection& operator=(DigisCollection const&) = default; + DigisCollection(uint32_t *ids, uint16_t *data, uint32_t ndigis) : ids{ids}, data{data}, ndigis{ndigis} {} + DigisCollection(DigisCollection const &) = default; + DigisCollection &operator=(DigisCollection const &) = default; - DigisCollection(DigisCollection&&) = default; - DigisCollection& operator=(DigisCollection&&) = default; + DigisCollection(DigisCollection &&) = default; + DigisCollection &operator=(DigisCollection &&) = default; // stride is statically known - uint32_t *ids=nullptr; - uint16_t *data=nullptr; + uint32_t *ids = nullptr; + uint16_t *data = nullptr; uint32_t ndigis; -}; + }; -} +} // namespace ecal -#endif // CUDADataFormats_EcalDigi_interface_DigisCollection_h +#endif // CUDADataFormats_EcalDigi_interface_DigisCollection_h diff --git a/CUDADataFormats/EcalRecHitSoA/interface/RecoTypes.h b/CUDADataFormats/EcalRecHitSoA/interface/RecoTypes.h index cf8571feb01ae..5667a9225f29d 100644 --- a/CUDADataFormats/EcalRecHitSoA/interface/RecoTypes.h +++ b/CUDADataFormats/EcalRecHitSoA/interface/RecoTypes.h @@ -1,11 +1,13 @@ #ifndef CUDADataFormats_EcalRecHitSoA_interface_RecoTypes #define CUDADataFormats_EcalRecHitSoA_interface_RecoTypes -namespace ecal { namespace reco { +namespace ecal { + namespace reco { -using ComputationScalarType = float; -using StorageScalarType = float; + using ComputationScalarType = float; + using StorageScalarType = float; -}} + } // namespace reco +} // namespace ecal #endif diff --git a/EventFilter/EcalRawToDigi/interface/ElectronicsIdGPU.h b/EventFilter/EcalRawToDigi/interface/ElectronicsIdGPU.h index 654ac2a42e0fe..1fdf1c29c4e9c 100644 --- a/EventFilter/EcalRawToDigi/interface/ElectronicsIdGPU.h +++ b/EventFilter/EcalRawToDigi/interface/ElectronicsIdGPU.h @@ -5,9 +5,10 @@ #include "DataFormats/EcalDetId/interface/EcalSubdetector.h" -namespace ecal { namespace raw { +namespace ecal { + namespace raw { -/** \brief Ecal readout channel identification + /** \brief Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower @@ -16,78 +17,75 @@ namespace ecal { namespace raw { Index starts from 1 */ -class ElectronicsIdGPU { -public: - /** Default constructor -- invalid value */ - constexpr ElectronicsIdGPU() : id_{0xFFFFFFFFu} {} - /** from raw */ - constexpr ElectronicsIdGPU(uint32_t id) : id_{id} {} - /** Constructor from dcc,tower,channel **/ - constexpr ElectronicsIdGPU( - uint8_t const dccid, uint8_t const towerid, - uint8_t const stripid, uint8_t const xtalid) - : id_{static_cast( - (xtalid & 0x7) | ((stripid & 0x7) << 3) | - ((towerid & 0x7F) << 6) | ((dccid & 0x7F) << 13))} - {} - - constexpr uint32_t operator()() { return id_; } - constexpr uint32_t rawId() const { return id_; } - - /// get the DCC (Ecal Local DCC value not global one) id - constexpr uint8_t dccId() const { return (id_ >> 13) & 0x7F; } - /// get the tower id - constexpr uint8_t towerId() const { return (id_ >> 6) & 0x7F; } - /// get the tower id - constexpr uint8_t stripId() const { return (id_ >> 3) & 0x7; } - /// get the channel id - constexpr uint8_t xtalId() const { return (id_ & 0x7); } - - /// get the subdet - //EcalSubdetector subdet() const; - - /// get a fast, compact, unique index for linear lookups (maximum value = 4194303) - constexpr uint32_t linearIndex() const { return id_ & 0x3FFFFF; } - - /// so far for EndCap only : - //int channelId() const; // xtal id between 1 and 25 - - static constexpr int kTowersInPhi = 4; // see EBDetId - static constexpr int kCrystalsInPhi = 20; // see EBDetId - - static constexpr uint8_t MAX_DCCID = 54; //To be updated with correct and final number - static constexpr uint8_t MIN_DCCID = 1; - static constexpr uint8_t MAX_TOWERID = 70; - static constexpr uint8_t MIN_TOWERID = 1; - static constexpr uint8_t MAX_STRIPID = 5; - static constexpr uint8_t MIN_STRIPID = 1; - static constexpr uint8_t MAX_CHANNELID = 25; - static constexpr uint8_t MIN_CHANNELID = 1; - static constexpr uint8_t MAX_XTALID = 5; - static constexpr uint8_t MIN_XTALID = 1; - - static constexpr int MIN_DCCID_EEM = 1; - static constexpr int MAX_DCCID_EEM = 9; - static constexpr int MIN_DCCID_EBM = 10; - static constexpr int MAX_DCCID_EBM = 27; - static constexpr int MIN_DCCID_EBP = 28; - static constexpr int MAX_DCCID_EBP = 45; - static constexpr int MIN_DCCID_EEP = 46; - static constexpr int MAX_DCCID_EEP = 54; - - static constexpr int DCCID_PHI0_EBM = 10; - static constexpr int DCCID_PHI0_EBP = 28; - - static constexpr int kDCCChannelBoundary = 17; - static constexpr int DCC_EBM = 10; // id of the DCC in EB- which contains phi=0 deg. - static constexpr int DCC_EBP = 28; // id of the DCC in EB+ which contains phi=0 deg. - static constexpr int DCC_EEM = 1; // id of the DCC in EE- which contains phi=0 deg. - static constexpr int DCC_EEP = 46; // id of the DCC in EE+ which contains phi=0 deg. - -private: - uint32_t id_; -}; - -}} - -#endif // EventFilter_EcalRawToDigi_interface_id_h + class ElectronicsIdGPU { + public: + /** Default constructor -- invalid value */ + constexpr ElectronicsIdGPU() : id_{0xFFFFFFFFu} {} + /** from raw */ + constexpr ElectronicsIdGPU(uint32_t id) : id_{id} {} + /** Constructor from dcc,tower,channel **/ + constexpr ElectronicsIdGPU(uint8_t const dccid, uint8_t const towerid, uint8_t const stripid, uint8_t const xtalid) + : id_{static_cast((xtalid & 0x7) | ((stripid & 0x7) << 3) | ((towerid & 0x7F) << 6) | + ((dccid & 0x7F) << 13))} {} + + constexpr uint32_t operator()() { return id_; } + constexpr uint32_t rawId() const { return id_; } + + /// get the DCC (Ecal Local DCC value not global one) id + constexpr uint8_t dccId() const { return (id_ >> 13) & 0x7F; } + /// get the tower id + constexpr uint8_t towerId() const { return (id_ >> 6) & 0x7F; } + /// get the tower id + constexpr uint8_t stripId() const { return (id_ >> 3) & 0x7; } + /// get the channel id + constexpr uint8_t xtalId() const { return (id_ & 0x7); } + + /// get the subdet + //EcalSubdetector subdet() const; + + /// get a fast, compact, unique index for linear lookups (maximum value = 4194303) + constexpr uint32_t linearIndex() const { return id_ & 0x3FFFFF; } + + /// so far for EndCap only : + //int channelId() const; // xtal id between 1 and 25 + + static constexpr int kTowersInPhi = 4; // see EBDetId + static constexpr int kCrystalsInPhi = 20; // see EBDetId + + static constexpr uint8_t MAX_DCCID = 54; //To be updated with correct and final number + static constexpr uint8_t MIN_DCCID = 1; + static constexpr uint8_t MAX_TOWERID = 70; + static constexpr uint8_t MIN_TOWERID = 1; + static constexpr uint8_t MAX_STRIPID = 5; + static constexpr uint8_t MIN_STRIPID = 1; + static constexpr uint8_t MAX_CHANNELID = 25; + static constexpr uint8_t MIN_CHANNELID = 1; + static constexpr uint8_t MAX_XTALID = 5; + static constexpr uint8_t MIN_XTALID = 1; + + static constexpr int MIN_DCCID_EEM = 1; + static constexpr int MAX_DCCID_EEM = 9; + static constexpr int MIN_DCCID_EBM = 10; + static constexpr int MAX_DCCID_EBM = 27; + static constexpr int MIN_DCCID_EBP = 28; + static constexpr int MAX_DCCID_EBP = 45; + static constexpr int MIN_DCCID_EEP = 46; + static constexpr int MAX_DCCID_EEP = 54; + + static constexpr int DCCID_PHI0_EBM = 10; + static constexpr int DCCID_PHI0_EBP = 28; + + static constexpr int kDCCChannelBoundary = 17; + static constexpr int DCC_EBM = 10; // id of the DCC in EB- which contains phi=0 deg. + static constexpr int DCC_EBP = 28; // id of the DCC in EB+ which contains phi=0 deg. + static constexpr int DCC_EEM = 1; // id of the DCC in EE- which contains phi=0 deg. + static constexpr int DCC_EEP = 46; // id of the DCC in EE+ which contains phi=0 deg. + + private: + uint32_t id_; + }; + + } // namespace raw +} // namespace ecal + +#endif // EventFilter_EcalRawToDigi_interface_id_h diff --git a/EventFilter/EcalRawToDigi/interface/ElectronicsMappingGPU.h b/EventFilter/EcalRawToDigi/interface/ElectronicsMappingGPU.h index 91dacbd883473..f1e8f472153cc 100644 --- a/EventFilter/EcalRawToDigi/interface/ElectronicsMappingGPU.h +++ b/EventFilter/EcalRawToDigi/interface/ElectronicsMappingGPU.h @@ -8,38 +8,40 @@ #include "HeterogeneousCore/CUDACore/interface/ESProduct.h" #endif -namespace ecal { namespace raw { +namespace ecal { + namespace raw { -class ElectronicsMappingGPU { -public: - struct Product { + class ElectronicsMappingGPU { + public: + struct Product { ~Product(); - uint32_t *eid2did; - }; + uint32_t* eid2did; + }; #ifndef __CUDACC__ - // rearrange pedestals - ElectronicsMappingGPU(EcalMappingElectronics const&); + // rearrange pedestals + ElectronicsMappingGPU(EcalMappingElectronics const&); - // will call dealloation for Product thru ~Product - ~ElectronicsMappingGPU() = default; + // will call dealloation for Product thru ~Product + ~ElectronicsMappingGPU() = default; - // get device pointers - Product const& getProduct(cudaStream_t) const; + // get device pointers + Product const& getProduct(cudaStream_t) const; - // - static std::string name() { return std::string{"ecalElectronicsMappingGPU"}; } + // + static std::string name() { return std::string{"ecalElectronicsMappingGPU"}; } -private: - // in the future, we need to arrange so to avoid this copy on the host - // store eb first then ee - std::vector> eid2did_; + private: + // in the future, we need to arrange so to avoid this copy on the host + // store eb first then ee + std::vector> eid2did_; - cms::cuda::ESProduct product_; + cms::cuda::ESProduct product_; #endif -}; + }; -}} + } // namespace raw +} // namespace ecal -#endif // EventFilter_EcalRawToDigi_interface_ElectronicsMappingGPU_h +#endif // EventFilter_EcalRawToDigi_interface_ElectronicsMappingGPU_h diff --git a/RecoLocalCalo/EcalRecAlgos/interface/EcalGainRatiosGPU.h b/RecoLocalCalo/EcalRecAlgos/interface/EcalGainRatiosGPU.h index 674695e472ec1..da4ce4ff10777 100644 --- a/RecoLocalCalo/EcalRecAlgos/interface/EcalGainRatiosGPU.h +++ b/RecoLocalCalo/EcalRecAlgos/interface/EcalGainRatiosGPU.h @@ -10,35 +10,34 @@ class EcalGainRatiosGPU { public: - struct Product { - ~Product(); - float *gain12Over6=nullptr, *gain6Over1=nullptr; - }; + struct Product { + ~Product(); + float *gain12Over6 = nullptr, *gain6Over1 = nullptr; + }; #ifndef __CUDACC__ - // rearrange pedestals - EcalGainRatiosGPU(EcalGainRatios const&); + // rearrange pedestals + EcalGainRatiosGPU(EcalGainRatios const&); - // will call dealloation for Product thru ~Product - ~EcalGainRatiosGPU() = default; + // will call dealloation for Product thru ~Product + ~EcalGainRatiosGPU() = default; - // get device pointers - Product const& getProduct(cudaStream_t) const; + // get device pointers + Product const& getProduct(cudaStream_t) const; - // - static std::string name() { return std::string{"ecalGainRatiosGPU"}; } + // + static std::string name() { return std::string{"ecalGainRatiosGPU"}; } private: - // in the future, we need to arrange so to avoid this copy on the host - // store eb first then ee - std::vector> gain12Over6_; - std::vector> gain6Over1_; + // in the future, we need to arrange so to avoid this copy on the host + // store eb first then ee + std::vector> gain12Over6_; + std::vector> gain6Over1_; - cms::cuda::ESProduct product_; + cms::cuda::ESProduct product_; #endif }; - #endif diff --git a/RecoLocalCalo/EcalRecAlgos/interface/EcalPedestalsGPU.h b/RecoLocalCalo/EcalRecAlgos/interface/EcalPedestalsGPU.h index 419b7273afa6d..1ff316714ada6 100644 --- a/RecoLocalCalo/EcalRecAlgos/interface/EcalPedestalsGPU.h +++ b/RecoLocalCalo/EcalRecAlgos/interface/EcalPedestalsGPU.h @@ -10,37 +10,37 @@ class EcalPedestalsGPU { public: - struct Product { - ~Product(); - float *mean_x12=nullptr, *mean_x6=nullptr, *mean_x1=nullptr; - float *rms_x12=nullptr, *rms_x6=nullptr, *rms_x1=nullptr; - }; + struct Product { + ~Product(); + float *mean_x12 = nullptr, *mean_x6 = nullptr, *mean_x1 = nullptr; + float *rms_x12 = nullptr, *rms_x6 = nullptr, *rms_x1 = nullptr; + }; #ifndef __CUDACC__ - // rearrange pedestals - EcalPedestalsGPU(EcalPedestals const&); + // rearrange pedestals + EcalPedestalsGPU(EcalPedestals const &); - // will call dealloation for Product thru ~Product - ~EcalPedestalsGPU() = default; + // will call dealloation for Product thru ~Product + ~EcalPedestalsGPU() = default; - // get device pointers - Product const& getProduct(cudaStream_t) const; + // get device pointers + Product const &getProduct(cudaStream_t) const; - // - static std::string name() { return std::string{"ecalPedestalsGPU"}; } + // + static std::string name() { return std::string{"ecalPedestalsGPU"}; } private: - // in the future, we need to arrange so to avoid this copy on the host - // store eb first then ee - std::vector> mean_x12_; - std::vector> rms_x12_; - std::vector> mean_x6_; - std::vector> rms_x6_; - std::vector> mean_x1_; - std::vector> rms_x1_; - - cms::cuda::ESProduct product_; + // in the future, we need to arrange so to avoid this copy on the host + // store eb first then ee + std::vector> mean_x12_; + std::vector> rms_x12_; + std::vector> mean_x6_; + std::vector> rms_x6_; + std::vector> mean_x1_; + std::vector> rms_x1_; + + cms::cuda::ESProduct product_; #endif }; diff --git a/RecoLocalCalo/EcalRecAlgos/interface/EcalPulseCovariancesGPU.h b/RecoLocalCalo/EcalRecAlgos/interface/EcalPulseCovariancesGPU.h index 0a3df41e8b85e..93e0ad2bbaecc 100644 --- a/RecoLocalCalo/EcalRecAlgos/interface/EcalPulseCovariancesGPU.h +++ b/RecoLocalCalo/EcalRecAlgos/interface/EcalPulseCovariancesGPU.h @@ -10,32 +10,31 @@ class EcalPulseCovariancesGPU { public: - struct Product { - ~Product(); - EcalPulseCovariance *values=nullptr; - }; + struct Product { + ~Product(); + EcalPulseCovariance* values = nullptr; + }; #ifndef __CUDACC__ - // rearrange pedestals - EcalPulseCovariancesGPU(EcalPulseCovariances const&); + // rearrange pedestals + EcalPulseCovariancesGPU(EcalPulseCovariances const&); - // will call dealloation for Product thru ~Product - ~EcalPulseCovariancesGPU() = default; + // will call dealloation for Product thru ~Product + ~EcalPulseCovariancesGPU() = default; - // get device pointers - Product const& getProduct(cudaStream_t) const; + // get device pointers + Product const& getProduct(cudaStream_t) const; - // - static std::string name() { return std::string{"ecalPulseCovariancesGPU"}; } + // + static std::string name() { return std::string{"ecalPulseCovariancesGPU"}; } private: - // reuse original vectors (although with default allocator) - std::vector const& valuesEB_; - std::vector const& valuesEE_; + // reuse original vectors (although with default allocator) + std::vector const& valuesEB_; + std::vector const& valuesEE_; - cms::cuda::ESProduct product_; + cms::cuda::ESProduct product_; #endif }; - #endif diff --git a/RecoLocalCalo/EcalRecAlgos/interface/EcalPulseShapesGPU.h b/RecoLocalCalo/EcalRecAlgos/interface/EcalPulseShapesGPU.h index 4fddcf24aac32..4c1ceb2b4b42c 100644 --- a/RecoLocalCalo/EcalRecAlgos/interface/EcalPulseShapesGPU.h +++ b/RecoLocalCalo/EcalRecAlgos/interface/EcalPulseShapesGPU.h @@ -10,32 +10,31 @@ class EcalPulseShapesGPU { public: - struct Product { - ~Product(); - EcalPulseShape *values=nullptr; - }; + struct Product { + ~Product(); + EcalPulseShape* values = nullptr; + }; #ifndef __CUDACC__ - // rearrange pedestals - EcalPulseShapesGPU(EcalPulseShapes const&); + // rearrange pedestals + EcalPulseShapesGPU(EcalPulseShapes const&); - // will call dealloation for Product thru ~Product - ~EcalPulseShapesGPU() = default; + // will call dealloation for Product thru ~Product + ~EcalPulseShapesGPU() = default; - // get device pointers - Product const& getProduct(cudaStream_t) const; + // get device pointers + Product const& getProduct(cudaStream_t) const; - // - static std::string name() { return std::string{"ecalPulseShapesGPU"}; } + // + static std::string name() { return std::string{"ecalPulseShapesGPU"}; } private: - // reuse original vectors (although with default allocator) - std::vector const& valuesEB_; - std::vector const& valuesEE_; + // reuse original vectors (although with default allocator) + std::vector const& valuesEB_; + std::vector const& valuesEE_; - cms::cuda::ESProduct product_; + cms::cuda::ESProduct product_; #endif }; - #endif diff --git a/RecoLocalCalo/EcalRecAlgos/interface/EcalSamplesCorrelationGPU.h b/RecoLocalCalo/EcalRecAlgos/interface/EcalSamplesCorrelationGPU.h index 3ae409a18e74c..e72e845597fa5 100644 --- a/RecoLocalCalo/EcalRecAlgos/interface/EcalSamplesCorrelationGPU.h +++ b/RecoLocalCalo/EcalRecAlgos/interface/EcalSamplesCorrelationGPU.h @@ -10,40 +10,35 @@ class EcalSamplesCorrelationGPU { public: - struct Product { - ~Product(); - double *EBG12SamplesCorrelation=nullptr, - *EBG6SamplesCorrelation=nullptr, - *EBG1SamplesCorrelation=nullptr; - double *EEG12SamplesCorrelation=nullptr, - *EEG6SamplesCorrelation=nullptr, - *EEG1SamplesCorrelation=nullptr; - }; + struct Product { + ~Product(); + double *EBG12SamplesCorrelation = nullptr, *EBG6SamplesCorrelation = nullptr, *EBG1SamplesCorrelation = nullptr; + double *EEG12SamplesCorrelation = nullptr, *EEG6SamplesCorrelation = nullptr, *EEG1SamplesCorrelation = nullptr; + }; #ifndef __CUDACC__ - // rearrange pedestals - EcalSamplesCorrelationGPU(EcalSamplesCorrelation const&); + // rearrange pedestals + EcalSamplesCorrelationGPU(EcalSamplesCorrelation const&); - // will call dealloation for Product thru ~Product - ~EcalSamplesCorrelationGPU() = default; + // will call dealloation for Product thru ~Product + ~EcalSamplesCorrelationGPU() = default; - // get device pointers - Product const& getProduct(cudaStream_t) const; + // get device pointers + Product const& getProduct(cudaStream_t) const; - // - static std::string name() { return std::string{"ecalSamplesCorrelationGPU"}; } + // + static std::string name() { return std::string{"ecalSamplesCorrelationGPU"}; } private: - std::vector const& EBG12SamplesCorrelation_; - std::vector const& EBG6SamplesCorrelation_; - std::vector const& EBG1SamplesCorrelation_; - std::vector const& EEG12SamplesCorrelation_; - std::vector const& EEG6SamplesCorrelation_; - std::vector const& EEG1SamplesCorrelation_; - - cms::cuda::ESProduct product_; + std::vector const& EBG12SamplesCorrelation_; + std::vector const& EBG6SamplesCorrelation_; + std::vector const& EBG1SamplesCorrelation_; + std::vector const& EEG12SamplesCorrelation_; + std::vector const& EEG6SamplesCorrelation_; + std::vector const& EEG1SamplesCorrelation_; + + cms::cuda::ESProduct product_; #endif }; - #endif diff --git a/RecoLocalCalo/EcalRecAlgos/interface/EcalTimeBiasCorrectionsGPU.h b/RecoLocalCalo/EcalRecAlgos/interface/EcalTimeBiasCorrectionsGPU.h index cbabea3351eb8..7aeee86fdabe8 100644 --- a/RecoLocalCalo/EcalRecAlgos/interface/EcalTimeBiasCorrectionsGPU.h +++ b/RecoLocalCalo/EcalRecAlgos/interface/EcalTimeBiasCorrectionsGPU.h @@ -10,43 +10,40 @@ class EcalTimeBiasCorrectionsGPU { public: - struct Product { - ~Product(); - float *EBTimeCorrAmplitudeBins, *EBTimeCorrShiftBins; - float *EETimeCorrAmplitudeBins, *EETimeCorrShiftBins; - int EBTimeCorrAmplitudeBinsSize, EETimeCorrAmplitudeBinsSize; - }; + struct Product { + ~Product(); + float *EBTimeCorrAmplitudeBins, *EBTimeCorrShiftBins; + float *EETimeCorrAmplitudeBins, *EETimeCorrShiftBins; + int EBTimeCorrAmplitudeBinsSize, EETimeCorrAmplitudeBinsSize; + }; - // rearrange pedestals - EcalTimeBiasCorrectionsGPU(EcalTimeBiasCorrections const&); + // rearrange pedestals + EcalTimeBiasCorrectionsGPU(EcalTimeBiasCorrections const&); #ifndef __CUDACC__ - // will call dealloation for Product thru ~Product - ~EcalTimeBiasCorrectionsGPU() = default; + // will call dealloation for Product thru ~Product + ~EcalTimeBiasCorrectionsGPU() = default; - // get device pointers - Product const& getProduct(cudaStream_t) const; + // get device pointers + Product const& getProduct(cudaStream_t) const; - // - static std::string name() { return std::string{"ecalTimeBiasCorrectionsGPU"}; } + // + static std::string name() { return std::string{"ecalTimeBiasCorrectionsGPU"}; } #endif - std::vector const& EBTimeCorrAmplitudeBins() const - { return EBTimeCorrAmplitudeBins_; } - std::vector const& EETimeCorrAmplitudeBins() const - { return EETimeCorrAmplitudeBins_; } + std::vector const& EBTimeCorrAmplitudeBins() const { return EBTimeCorrAmplitudeBins_; } + std::vector const& EETimeCorrAmplitudeBins() const { return EETimeCorrAmplitudeBins_; } private: - std::vector const& EBTimeCorrAmplitudeBins_; - std::vector const& EBTimeCorrShiftBins_; - std::vector const& EETimeCorrAmplitudeBins_; - std::vector const& EETimeCorrShiftBins_; + std::vector const& EBTimeCorrAmplitudeBins_; + std::vector const& EBTimeCorrShiftBins_; + std::vector const& EETimeCorrAmplitudeBins_; + std::vector const& EETimeCorrShiftBins_; #ifndef __CUDACC__ - cms::cuda::ESProduct product_; + cms::cuda::ESProduct product_; #endif }; - #endif diff --git a/RecoLocalCalo/EcalRecAlgos/interface/EcalTimeCalibConstantsGPU.h b/RecoLocalCalo/EcalRecAlgos/interface/EcalTimeCalibConstantsGPU.h index f82f4d5a0530f..ef21976fc7088 100644 --- a/RecoLocalCalo/EcalRecAlgos/interface/EcalTimeCalibConstantsGPU.h +++ b/RecoLocalCalo/EcalRecAlgos/interface/EcalTimeCalibConstantsGPU.h @@ -10,35 +10,34 @@ class EcalTimeCalibConstantsGPU { public: - struct Product { - ~Product(); - float *values=nullptr; - }; + struct Product { + ~Product(); + float* values = nullptr; + }; #ifndef __CUDACC__ - // rearrange pedestals - EcalTimeCalibConstantsGPU(EcalTimeCalibConstants const&); + // rearrange pedestals + EcalTimeCalibConstantsGPU(EcalTimeCalibConstants const&); - // will call dealloation for Product thru ~Product - ~EcalTimeCalibConstantsGPU() = default; + // will call dealloation for Product thru ~Product + ~EcalTimeCalibConstantsGPU() = default; - // get device pointers - Product const& getProduct(cudaStream_t) const; + // get device pointers + Product const& getProduct(cudaStream_t) const; - // TODO: do this centrally - // get offset for hashes. equals number of barrel items - uint32_t getOffset() const { return valuesEB_.size(); } + // TODO: do this centrally + // get offset for hashes. equals number of barrel items + uint32_t getOffset() const { return valuesEB_.size(); } - // - static std::string name() { return std::string{"ecalTimeCalibConstantsGPU"}; } + // + static std::string name() { return std::string{"ecalTimeCalibConstantsGPU"}; } private: - std::vector const& valuesEB_; - std::vector const& valuesEE_; + std::vector const& valuesEB_; + std::vector const& valuesEE_; - cms::cuda::ESProduct product_; + cms::cuda::ESProduct product_; #endif }; - #endif