Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:26:50

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