Skip to content

Commit

Permalink
Merge pull request #53 from ktf/fix-pairs
Browse files Browse the repository at this point in the history
Fix the memory spikes
  • Loading branch information
ktf committed Jul 8, 2013
2 parents 3b8c52d + 164bc35 commit 650e09d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion RecoTracker/TkHitPairs/src/HitPairGeneratorFromLayerPair.cc
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ void HitPairGeneratorFromLayerPair::hitPairs(
for (std::size_t i=0; i!=ds.size(); ++i) {
result.push_back( OrderedHitPair( ds.hit(i,HitDoublets::inner),ds.hit(i,HitDoublets::outer) ));
}

if (theMaxElement!=0 && result.size() >= theMaxElement){
result.clear();
edm::LogError("TooManyPairs")<<"number of pairs exceed maximum, no pairs produced";
}
}


Expand Down

0 comments on commit 650e09d

Please sign in to comment.