Skip to content

Commit

Permalink
Merge pull request #14662 from VinInn/FixTooManyClustersInSiPixelClus…
Browse files Browse the repository at this point in the history
…terProducer80

fix crash in case Limit on the number of clusters is really exceeded.
  • Loading branch information
cmsbuild committed May 27, 2016
2 parents 62b3f45 + 7ed8ff9 commit 002eef3
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -175,6 +175,7 @@
// Fatal error! TO DO: throw an exception!
assert(0);
}
{
// Produce clusters for this DetUnit and store them in
// a DetSet
edmNew::DetSetVector<SiPixelCluster>::FastFiller spc(output, DSViter->detId());
Expand All @@ -184,7 +185,7 @@
} else {
numberOfClusters += spc.size();
}

} // spc is not deleted and detsetvector updated
if ((maxTotalClusters_ >= 0) && (numberOfClusters > maxTotalClusters_)) {
edm::LogError("TooManyClusters") << "Limit on the number of clusters exceeded. An empty cluster collection will be produced instead.\n";
edmNew::DetSetVector<SiPixelCluster> empty;
Expand Down

0 comments on commit 002eef3

Please sign in to comment.