#include <LayerHitMapCache.h>
Classes | |
class | SimpleCache |
Public Member Functions | |
void | clear () |
LayerHitMapCache (const LayerHitMapCache &) | |
LayerHitMapCache (int initSize=50) | |
const RecHitsSortedInPhi & | operator() (const ctfseeding::SeedingLayer *layer, const TrackingRegion ®ion, const edm::Event &iEvent, const edm::EventSetup &iSetup) |
~LayerHitMapCache () | |
Private Types | |
typedef SimpleCache < LayerRegionKey, RecHitsSortedInPhi > | Cache |
typedef const DetLayer * | LayerRegionKey |
Private Attributes | |
Cache * | theCache |
A cache adressable by DetLayer* and TrackingRegion* . Used to cache all the hits of a DetLayer.
Definition at line 14 of file LayerHitMapCache.h.
typedef SimpleCache<LayerRegionKey, RecHitsSortedInPhi> LayerHitMapCache::Cache [private] |
Definition at line 48 of file LayerHitMapCache.h.
typedef const DetLayer* LayerHitMapCache::LayerRegionKey [private] |
Definition at line 47 of file LayerHitMapCache.h.
LayerHitMapCache::LayerHitMapCache | ( | int | initSize = 50 | ) | [inline] |
Definition at line 50 of file LayerHitMapCache.h.
References theCache.
LayerHitMapCache::~LayerHitMapCache | ( | ) | [inline] |
LayerHitMapCache::LayerHitMapCache | ( | const LayerHitMapCache & | ) | [inline] |
Definition at line 73 of file LayerHitMapCache.h.
{ }
void LayerHitMapCache::clear | ( | void | ) | [inline] |
Definition at line 54 of file LayerHitMapCache.h.
References LayerHitMapCache::SimpleCache< KeyType, ValueType >::clear(), and theCache.
Referenced by CombinedHitQuadrupletGeneratorForPhotonConversion::clearLayerCache(), CombinedHitPairGeneratorForPhotonConversion::clearLayerCache(), CombinedHitQuadrupletGeneratorForPhotonConversion::hitPairs(), CombinedHitPairGenerator::hitPairs(), and CombinedHitTripletGenerator::hitTriplets().
const RecHitsSortedInPhi& LayerHitMapCache::operator() | ( | const ctfseeding::SeedingLayer * | layer, |
const TrackingRegion & | region, | ||
const edm::Event & | iEvent, | ||
const edm::EventSetup & | iSetup | ||
) | [inline] |
Definition at line 56 of file LayerHitMapCache.h.
References LayerHitMapCache::SimpleCache< KeyType, ValueType >::add(), ctfseeding::SeedingLayer::detLayer(), LayerHitMapCache::SimpleCache< KeyType, ValueType >::get(), TrackingRegion::hits(), combine::key, LogDebug, and theCache.
{ LayerRegionKey key(layer->detLayer()); const RecHitsSortedInPhi * lhm = theCache->get(key); if (lhm==0) { lhm=new RecHitsSortedInPhi (region.hits(iEvent,iSetup,layer)); LogDebug("LayerHitMapCache")<<" I got"<< lhm->all().second-lhm->all().first<<" hits in the cache for: "<<layer->detLayer(); theCache->add( key, lhm); } else{ LogDebug("LayerHitMapCache")<<" I got"<< lhm->all().second-lhm->all().first<<" hits FROM THE cache for: "<<layer->detLayer(); } return *lhm; }
Cache* LayerHitMapCache::theCache [private] |
Definition at line 76 of file LayerHitMapCache.h.
Referenced by clear(), LayerHitMapCache(), operator()(), and ~LayerHitMapCache().