Skip to content

Commit

Permalink
Apply code formatting (#524)
Browse files Browse the repository at this point in the history
  • Loading branch information
VinInn authored and fwyzard committed Oct 8, 2020
1 parent 1148c56 commit ea69aac
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
6 changes: 4 additions & 2 deletions EventFilter/EcalRawToDigi/plugins/DeclsForKernels.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ namespace ecal {
DigisCollection<::calo::common::DevStoragePolicy> digisEB, digisEE;

void allocate(ConfigurationParameters const &config, cudaStream_t cudaStream) {
digisEB.data = cms::cuda::make_device_unique<uint16_t[]>(config.maxChannelsEB * EcalDataFrame::MAXSAMPLES, cudaStream);
digisEE.data = cms::cuda::make_device_unique<uint16_t[]>(config.maxChannelsEE * EcalDataFrame::MAXSAMPLES, cudaStream);
digisEB.data =
cms::cuda::make_device_unique<uint16_t[]>(config.maxChannelsEB * EcalDataFrame::MAXSAMPLES, cudaStream);
digisEE.data =
cms::cuda::make_device_unique<uint16_t[]>(config.maxChannelsEE * EcalDataFrame::MAXSAMPLES, cudaStream);
digisEB.ids = cms::cuda::make_device_unique<uint32_t[]>(config.maxChannelsEB, cudaStream);
digisEE.ids = cms::cuda::make_device_unique<uint32_t[]>(config.maxChannelsEE, cudaStream);
}
Expand Down
10 changes: 5 additions & 5 deletions RecoLocalCalo/EcalRecProducers/plugins/DeclsForKernels.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ namespace ecal {

void allocate(ConfigurationParameters const& configParameters, cudaStream_t cudaStream) {
auto const sizeEB = configParameters.maxNumberHitsEB;
recHitsEB.amplitudesAll =
cms::cuda::make_device_unique<reco::ComputationScalarType[]>(sizeEB * EcalDataFrame::MAXSAMPLES, cudaStream);
recHitsEB.amplitudesAll = cms::cuda::make_device_unique<reco::ComputationScalarType[]>(
sizeEB * EcalDataFrame::MAXSAMPLES, cudaStream);
recHitsEB.amplitude = cms::cuda::make_device_unique<reco::StorageScalarType[]>(sizeEB, cudaStream);
recHitsEB.chi2 = cms::cuda::make_device_unique<reco::StorageScalarType[]>(sizeEB, cudaStream);
recHitsEB.pedestal = cms::cuda::make_device_unique<reco::StorageScalarType[]>(sizeEB, cudaStream);
Expand All @@ -115,8 +115,8 @@ namespace ecal {
recHitsEB.flags = cms::cuda::make_device_unique<uint32_t[]>(sizeEB, cudaStream);

auto const sizeEE = configParameters.maxNumberHitsEE;
recHitsEE.amplitudesAll =
cms::cuda::make_device_unique<reco::ComputationScalarType[]>(sizeEE * EcalDataFrame::MAXSAMPLES, cudaStream);
recHitsEE.amplitudesAll = cms::cuda::make_device_unique<reco::ComputationScalarType[]>(
sizeEE * EcalDataFrame::MAXSAMPLES, cudaStream);
recHitsEE.amplitude = cms::cuda::make_device_unique<reco::StorageScalarType[]>(sizeEE, cudaStream);
recHitsEE.chi2 = cms::cuda::make_device_unique<reco::StorageScalarType[]>(sizeEE, cudaStream);
recHitsEE.pedestal = cms::cuda::make_device_unique<reco::StorageScalarType[]>(sizeEE, cudaStream);
Expand Down Expand Up @@ -278,7 +278,7 @@ namespace ecal {
uint32_t flagmask;
uint32_t maxNumberHitsEB;
uint32_t maxNumberHitsEE;

//
// bool shouldRunTimingComputation;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ EcalRecHitProducerGPU::EcalRecHitProducerGPU(const edm::ParameterSet& ps) {
// max number of digis to allocate for
configParameters_.maxNumberHitsEB = ps.getParameter<uint32_t>("maxNumberHitsEB");
configParameters_.maxNumberHitsEE = ps.getParameter<uint32_t>("maxNumberHitsEE");

flagmask_ = 0;
flagmask_ |= 0x1 << EcalRecHit::kNeighboursRecovered;
flagmask_ |= 0x1 << EcalRecHit::kTowerRecovered;
Expand Down Expand Up @@ -166,7 +166,8 @@ void EcalRecHitProducerGPU::acquire(edm::Event const& event,
// std::cout << " [EcalRecHitProducerGPU::acquire] neb_:nee_ = " << neb_ << " : " << nee_ << std::endl;

if ((neb_ > configParameters_.maxNumberHitsEB) || (nee_ > configParameters_.maxNumberHitsEE)) {
edm::LogError("EcalRecHitProducerGPU") << "max number of channels exceeded. See options 'maxNumberHitsEB and maxNumberHitsEE' ";
edm::LogError("EcalRecHitProducerGPU")
<< "max number of channels exceeded. See options 'maxNumberHitsEB and maxNumberHitsEE' ";
}

int nchannelsEB = ebUncalibRecHits.size; // --> offsetForInput, first EB and then EE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ EcalUncalibRecHitProducerGPU::EcalUncalibRecHitProducerGPU(const edm::ParameterS
// max number of digis to allocate for
configParameters_.maxNumberHitsEB = ps.getParameter<uint32_t>("maxNumberHitsEB");
configParameters_.maxNumberHitsEE = ps.getParameter<uint32_t>("maxNumberHitsEE");

// switch to run timing computation kernels
configParameters_.shouldRunTimingComputation = ps.getParameter<bool>("shouldRunTimingComputation");

Expand Down Expand Up @@ -213,7 +213,8 @@ void EcalUncalibRecHitProducerGPU::acquire(edm::Event const& event,
nee_ = eeDigis.size;

if ((neb_ > configParameters_.maxNumberHitsEB) || (nee_ > configParameters_.maxNumberHitsEE)) {
edm::LogError("EcalUncalibRecHitProducerGPU") << "max number of channels exceeded. See options 'maxNumberHitsEB and maxNumberHitsEE' ";
edm::LogError("EcalUncalibRecHitProducerGPU")
<< "max number of channels exceeded. See options 'maxNumberHitsEB and maxNumberHitsEE' ";
}

// conditions
Expand Down

0 comments on commit ea69aac

Please sign in to comment.