CMS 3D CMS Logo

LayerHitMapCache Class Reference

A cache adressable by DetLayer* and TrackingRegion* . More...

#include <RecoTracker/TkHitPairs/interface/LayerHitMapCache.h>

List of all members.

Public Member Functions

void clear ()
 LayerHitMapCache (const LayerHitMapCache &)
 LayerHitMapCache (int initSize=50)
const LayerHitMapoperator() (const ctfseeding::SeedingLayer *layer, const TrackingRegion &region, const edm::Event &iEvent, const edm::EventSetup &iSetup)
 ~LayerHitMapCache ()

Private Types

typedef SimpleCache
< LayerRegionKey, LayerHitMap
Cache
typedef const DetLayerLayerRegionKey

Private Attributes

CachetheCache

Classes

class  SimpleCache


Detailed Description

A cache adressable by DetLayer* and TrackingRegion* .

Used to cache all the hits of a DetLayer.

Definition at line 14 of file LayerHitMapCache.h.


Member Typedef Documentation

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.


Constructor & Destructor Documentation

LayerHitMapCache::LayerHitMapCache ( int  initSize = 50  )  [inline]

Definition at line 51 of file LayerHitMapCache.h.

References theCache.

00051 { theCache = new Cache(initSize); }

LayerHitMapCache::~LayerHitMapCache (  )  [inline]

Definition at line 53 of file LayerHitMapCache.h.

References theCache.

00053 { delete theCache; }

LayerHitMapCache::LayerHitMapCache ( const LayerHitMapCache  )  [inline]

Definition at line 71 of file LayerHitMapCache.h.

00071 { }


Member Function Documentation

void LayerHitMapCache::clear ( void   )  [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().

00055 { theCache->clear(); }

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(),&region);
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   }


Member Data Documentation

Cache* LayerHitMapCache::theCache [private]

Definition at line 74 of file LayerHitMapCache.h.

Referenced by clear(), LayerHitMapCache(), operator()(), and ~LayerHitMapCache().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:27:27 2009 for CMSSW by  doxygen 1.5.4