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
 HitPairGenerator (unsigned int size=7500)
virtual void hitPairs (const TrackingRegion &reg, OrderedHitPairs &prs, const edm::Event &ev, const edm::EventSetup &es)=0
virtual void hitPairs (const TrackingRegion &reg, OrderedHitPairs &prs, const edm::EventSetup &es)
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 17 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 22 of file HitPairGenerator.h.

{ }

Member Function Documentation

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

Reimplemented from OrderedHitsGenerator.

Definition at line 36 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 void HitPairGenerator::hitPairs ( const TrackingRegion reg,
OrderedHitPairs prs,
const edm::EventSetup es 
) [inline, virtual]
virtual void HitPairGenerator::hitPairs ( const TrackingRegion reg,
OrderedHitPairs prs,
const edm::Event ev,
const edm::EventSetup es 
) [pure 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 46 of file HitPairGenerator.h.

Referenced by clear().