CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HitPairGenerator Class Referenceabstract

#include <HitPairGenerator.h>

Inheritance diagram for HitPairGenerator:
OrderedHitsGenerator CombinedHitPairGenerator

Public Member Functions

void clear () final
 
 HitPairGenerator (unsigned int size=4000)
 
 HitPairGenerator (HitPairGenerator const &other)
 
virtual void hitPairs (const TrackingRegion &reg, OrderedHitPairs &prs, const edm::Event &ev, const edm::EventSetup &es)=0
 
const OrderedHitPairsrun (const TrackingRegion &region, const edm::Event &ev, const edm::EventSetup &es) override
 
 ~HitPairGenerator () override
 
- Public Member Functions inherited from OrderedHitsGenerator
 OrderedHitsGenerator ()
 
virtual ~OrderedHitsGenerator ()
 

Private Attributes

edm::RunningAverage localRA
 
OrderedHitPairs thePairs
 

Additional Inherited Members

- Public Attributes inherited from OrderedHitsGenerator
unsigned int theMaxElement
 

Detailed Description

Definition at line 23 of file HitPairGenerator.h.

Constructor & Destructor Documentation

◆ HitPairGenerator() [1/2]

HitPairGenerator::HitPairGenerator ( unsigned int  size = 4000)
explicit

Definition at line 3 of file HitPairGenerator.cc.

3 : localRA(nSize) {}
edm::RunningAverage localRA

◆ HitPairGenerator() [2/2]

HitPairGenerator::HitPairGenerator ( HitPairGenerator const &  other)
inline

Definition at line 26 of file HitPairGenerator.h.

26 : localRA(other.localRA.mean()) {}
edm::RunningAverage localRA

◆ ~HitPairGenerator()

HitPairGenerator::~HitPairGenerator ( )
inlineoverride

Definition at line 28 of file HitPairGenerator.h.

28 {}

Member Function Documentation

◆ clear()

void HitPairGenerator::clear ( void  )
finalvirtual

Reimplemented from OrderedHitsGenerator.

Definition at line 16 of file HitPairGenerator.cc.

References localRA, OrderedHitPairs::size(), thePairs, and edm::RunningAverage::update().

16  {
18  thePairs.clear();
19  thePairs.shrink_to_fit();
20 }
edm::RunningAverage localRA
unsigned int size() const override
OrderedHitPairs thePairs
void update(unsigned int q)

◆ hitPairs()

virtual void HitPairGenerator::hitPairs ( const TrackingRegion reg,
OrderedHitPairs prs,
const edm::Event ev,
const edm::EventSetup es 
)
pure virtual

Implemented in CombinedHitPairGenerator.

Referenced by run().

◆ run()

const OrderedHitPairs & HitPairGenerator::run ( const TrackingRegion region,
const edm::Event ev,
const edm::EventSetup es 
)
overridevirtual

Implements OrderedHitsGenerator.

Definition at line 5 of file HitPairGenerator.cc.

References cms::cuda::assert(), makeMEIFBenchmarkPlots::ev, hitPairs(), localRA, nano_mu_digi_cff::region, thePairs, and edm::RunningAverage::upper().

7  {
8  assert(thePairs.empty());
9  assert(thePairs.capacity() == 0);
10  thePairs.reserve(localRA.upper());
11  hitPairs(region, thePairs, ev, es);
12  thePairs.shrink_to_fit();
13  return thePairs;
14 }
edm::RunningAverage localRA
assert(be >=bs)
virtual void hitPairs(const TrackingRegion &reg, OrderedHitPairs &prs, const edm::Event &ev, const edm::EventSetup &es)=0
OrderedHitPairs thePairs

Member Data Documentation

◆ localRA

edm::RunningAverage HitPairGenerator::localRA
private

Definition at line 41 of file HitPairGenerator.h.

Referenced by clear(), and run().

◆ thePairs

OrderedHitPairs HitPairGenerator::thePairs
private

Definition at line 40 of file HitPairGenerator.h.

Referenced by clear(), and run().