Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:27:48

0001 #include "RecoTracker/TkHitPairs/interface/HitPairGenerator.h"
0002 
0003 HitPairGenerator::HitPairGenerator(unsigned int nSize) : localRA(nSize) {}
0004 
0005 const OrderedHitPairs& HitPairGenerator::run(const TrackingRegion& region,
0006                                              const edm::Event& ev,
0007                                              const edm::EventSetup& es) {
0008   assert(thePairs.empty());
0009   assert(thePairs.capacity() == 0);
0010   thePairs.reserve(localRA.upper());
0011   hitPairs(region, thePairs, ev, es);
0012   thePairs.shrink_to_fit();
0013   return thePairs;
0014 }
0015 
0016 void HitPairGenerator::clear() {
0017   localRA.update(thePairs.size());
0018   thePairs.clear();
0019   thePairs.shrink_to_fit();
0020 }