Skip to content

Commit

Permalink
Move LogWarning into the EDProducer (#422)
Browse files Browse the repository at this point in the history
In CMSSW 11.0.0 the MessageLogger is no longer usable in CUDA code due
to the use of c++17 featutres.
  • Loading branch information
VinInn authored and fwyzard committed Dec 29, 2020
1 parent a8b3019 commit 9d2ab95
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions RecoLocalTracker/SiPixelRecHits/plugins/SiPixelRecHitCUDA.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ void SiPixelRecHitCUDA::produce(edm::StreamID streamID, edm::Event& iEvent, cons
iEvent.getByToken(tBeamSpot, hbs);
auto const& bs = ctx.get(*hbs);

auto nHits = clusters.nClusters();
if (nHits >= TrackingRecHit2DSOAView::maxHits()) {
edm::LogWarning("PixelRecHitGPUKernel")
<< "Clusters/Hits Overflow " << nHits << " >= " << TrackingRecHit2DSOAView::maxHits();
}

ctx.emplace(iEvent,
tokenHit_,
gpuAlgo_.makeHitsAsync(digis, clusters, bs, fcpe->getGPUProductAsync(ctx.stream()), ctx.stream()));
Expand Down

0 comments on commit 9d2ab95

Please sign in to comment.