CMS 3D CMS Logo

Public Member Functions | Private Attributes

HitPairGenerator Class Reference

#include <HitPairGenerator.h>

Inheritance diagram for HitPairGenerator:
OrderedHitsGenerator CombinedHitPairGenerator CombinedHitPairGeneratorForPhotonConversion CombinedHitQuadrupletGeneratorForPhotonConversion CosmicHitPairGenerator CosmicHitPairGeneratorFromLayerPair HitPairGeneratorFromLayerPair HitPairGeneratorFromLayerPairForPhotonConversion HitQuadrupletGeneratorFromLayerPairForPhotonConversion

List of all members.

Public Member Functions

virtual void clear ()
virtual HitPairGeneratorclone () const =0
virtual HitDoublets doublets (const TrackingRegion &reg, const edm::Event &ev, const edm::EventSetup &es)
 HitPairGenerator (unsigned int size=7500)
virtual void hitPairs (const TrackingRegion &reg, OrderedHitPairs &prs, const edm::EventSetup &es)
virtual void hitPairs (const TrackingRegion &reg, OrderedHitPairs &prs, const edm::Event &ev, const edm::EventSetup &es)=0
virtual const OrderedHitPairsrun (const TrackingRegion &region, const edm::Event &ev, const edm::EventSetup &es)
virtual ~HitPairGenerator ()

Private Attributes

unsigned int m_capacity
OrderedHitPairs thePairs

Detailed Description

Definition at line 18 of file HitPairGenerator.h.


Constructor & Destructor Documentation

HitPairGenerator::HitPairGenerator ( unsigned int  size = 7500) [explicit]

Definition at line 3 of file HitPairGenerator.cc.

References thePairs.

                                                     : m_capacity(nSize)
{
  thePairs.reserve(nSize);
}
virtual HitPairGenerator::~HitPairGenerator ( ) [inline, virtual]

Definition at line 23 of file HitPairGenerator.h.

{ }

Member Function Documentation

virtual void HitPairGenerator::clear ( void  ) [inline, virtual]

Reimplemented from OrderedHitsGenerator.

Definition at line 44 of file HitPairGenerator.h.

References m_capacity, thePairs, and tmp.

                       {
     // back to initial allocation if too large
     if (thePairs.capacity()> 4*m_capacity) {
       OrderedHitPairs tmp; tmp.reserve(m_capacity); tmp.swap(thePairs);
     } 
     thePairs.clear(); 
  } 
virtual HitPairGenerator* HitPairGenerator::clone ( ) const [pure virtual]
virtual HitDoublets HitPairGenerator::doublets ( const TrackingRegion reg,
const edm::Event ev,
const edm::EventSetup es 
) [inline, virtual]

Reimplemented in HitPairGeneratorFromLayerPair.

Definition at line 33 of file HitPairGenerator.h.

Referenced by PixelTripletHLTGenerator::hitTriplets(), and PixelTripletLargeTipGenerator::hitTriplets().

                                                                            {
    assert(0=="not implemented");
  }
virtual void HitPairGenerator::hitPairs ( const TrackingRegion reg,
OrderedHitPairs prs,
const edm::Event ev,
const edm::EventSetup es 
) [pure virtual]
virtual void HitPairGenerator::hitPairs ( const TrackingRegion reg,
OrderedHitPairs prs,
const edm::EventSetup es 
) [inline, virtual]
const OrderedHitPairs & HitPairGenerator::run ( const TrackingRegion region,
const edm::Event ev,
const edm::EventSetup es 
) [virtual]

Implements OrderedHitsGenerator.

Reimplemented in CombinedHitQuadrupletGeneratorForPhotonConversion.

Definition at line 8 of file HitPairGenerator.cc.

References hitPairs(), and thePairs.

{
  thePairs.clear();
  hitPairs(region, thePairs, ev, es);
  return thePairs;
}

Member Data Documentation

unsigned int HitPairGenerator::m_capacity [private]

Definition at line 54 of file HitPairGenerator.h.

Referenced by clear().