test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTCache.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
15 //
16 //--------------------------------------------------
17 #ifndef DT_CACHE_H
18 #define DT_CACHE_H
19 
20 #include <vector>
21 
22 template<class T, class Coll=std::vector<T> > class DTCache {
23 
24  public:
25 
26  typedef T my_type;
27  typedef Coll my_collection;
28  typedef typename my_collection::iterator iterator;
29  typedef typename my_collection::const_iterator const_iterator;
30 
31  public:
32 
34  DTCache(){}
35 
37  virtual ~DTCache(){}
38 
40  const_iterator begin() const { return _cache.begin();}
41 
43  const_iterator end() const {return _cache.end();}
44 
46  int size() const {return _cache.size();}
47 
49  void clearCache() {_cache.clear();}
50 
52  virtual void reconstruct() {}
53 
54  protected:
55 
57 
58 };
59 #endif
virtual ~DTCache()
Destructor.
Definition: DTCache.h:37
my_collection::iterator iterator
Definition: DTCache.h:28
my_collection _cache
Definition: DTCache.h:56
Coll my_collection
Definition: DTCache.h:27
my_collection::const_iterator const_iterator
Definition: DTCache.h:29
DTCache()
Constructor.
Definition: DTCache.h:34
T my_type
Definition: DTCache.h:26
const_iterator begin() const
Get first cache element.
Definition: DTCache.h:40
virtual void reconstruct()
Virtual reconstruct member.
Definition: DTCache.h:52
long double T
const_iterator end() const
Get last cache element.
Definition: DTCache.h:43
void clearCache()
Clear cache vector.
Definition: DTCache.h:49
int size() const
Get cache vector&#39;s size.
Definition: DTCache.h:46