#include <RecoTracker/TkHitPairs/interface/LayerHitMapCache.h>
Public Member Functions | |
void | clear () |
LayerHitMapCache (const LayerHitMapCache &) | |
LayerHitMapCache (int initSize=50) | |
const LayerHitMap & | operator() (const ctfseeding::SeedingLayer *layer, const TrackingRegion ®ion, const edm::Event &iEvent, const edm::EventSetup &iSetup) |
~LayerHitMapCache () | |
Private Types | |
typedef SimpleCache < LayerRegionKey, LayerHitMap > | Cache |
typedef const DetLayer * | LayerRegionKey |
Private Attributes | |
Cache * | theCache |
Classes | |
class | SimpleCache |
Used to cache all the hits of a DetLayer.
Definition at line 14 of file LayerHitMapCache.h.
typedef SimpleCache<LayerRegionKey, LayerHitMap> LayerHitMapCache::Cache [private] |
Definition at line 49 of file LayerHitMapCache.h.
typedef const DetLayer* LayerHitMapCache::LayerRegionKey [private] |
Definition at line 48 of file LayerHitMapCache.h.
LayerHitMapCache::LayerHitMapCache | ( | int | initSize = 50 |
) | [inline] |
LayerHitMapCache::~LayerHitMapCache | ( | ) | [inline] |
LayerHitMapCache::LayerHitMapCache | ( | const LayerHitMapCache & | ) | [inline] |
Definition at line 55 of file LayerHitMapCache.h.
References LayerHitMapCache::SimpleCache< KeyType, ValueType >::clear(), and theCache.
Referenced by LaserHitPairGenerator::hitPairs(), CombinedHitPairGenerator::hitPairs(), and CombinedHitTripletGenerator::hitTriplets().
const LayerHitMap& LayerHitMapCache::operator() | ( | const ctfseeding::SeedingLayer * | layer, | |
const TrackingRegion & | region, | |||
const edm::Event & | iEvent, | |||
const edm::EventSetup & | iSetup | |||
) | [inline] |
Definition at line 57 of file LayerHitMapCache.h.
References LayerHitMapCache::SimpleCache< KeyType, ValueType >::add(), ctfseeding::SeedingLayer::detLayer(), LayerHitMapCache::SimpleCache< KeyType, ValueType >::get(), TrackingRegion::hits(), getDQMSummary::key, and theCache.
00059 { 00060 // LayerRegionKey key(layer->detLayer(),®ion); 00061 LayerRegionKey key(layer->detLayer()); 00062 const LayerHitMap * lhm = theCache->get(key); 00063 if (lhm==0) { 00064 lhm=new LayerHitMap( layer->detLayer(), region.hits(iEvent,iSetup,layer)); 00065 theCache->add( key, lhm); 00066 } 00067 return *lhm; 00068 }
Cache* LayerHitMapCache::theCache [private] |
Definition at line 74 of file LayerHitMapCache.h.
Referenced by clear(), LayerHitMapCache(), operator()(), and ~LayerHitMapCache().