CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
SimpleCaloRecHitMetaCollection< C > Class Template Reference

#include <CaloRecHitMetaCollections.h>

Inheritance diagram for SimpleCaloRecHitMetaCollection< C >:
CaloRecHitMetaCollectionV

Public Types

typedef
CaloRecHitMetaCollectionV::const_iterator 
const_iterator
 
- Public Types inherited from CaloRecHitMetaCollectionV
typedef Iterator const_iterator
 

Public Member Functions

virtual const CaloRecHitat (const_iterator::offset_type i) const
 get an item by index More...
 
virtual const_iterator find (const DetId &id) const
 find by id (default version is very slow unsorted find) More...
 
 SimpleCaloRecHitMetaCollection (const C &c)
 
 SimpleCaloRecHitMetaCollection (const C *c)
 
- Public Member Functions inherited from CaloRecHitMetaCollectionV
const_iterator begin () const
 get the starting iterator More...
 
const_iterator end () const
 get the ending iterator More...
 
unsigned int size () const
 get the size of the collection More...
 
virtual ~CaloRecHitMetaCollectionV ()
 

Private Attributes

const C & coll_
 

Additional Inherited Members

- Protected Member Functions inherited from CaloRecHitMetaCollectionV
 CaloRecHitMetaCollectionV ()
 
- Protected Attributes inherited from CaloRecHitMetaCollectionV
unsigned int size_
 

Detailed Description

template<class C>
class SimpleCaloRecHitMetaCollection< C >

Definition at line 9 of file CaloRecHitMetaCollections.h.

Member Typedef Documentation

Definition at line 11 of file CaloRecHitMetaCollections.h.

Constructor & Destructor Documentation

template<class C >
SimpleCaloRecHitMetaCollection< C >::SimpleCaloRecHitMetaCollection ( const C &  c)
inline
template<class C >
SimpleCaloRecHitMetaCollection< C >::SimpleCaloRecHitMetaCollection ( const C *  c)
inline

Member Function Documentation

template<class C >
virtual const CaloRecHit* SimpleCaloRecHitMetaCollection< C >::at ( const_iterator::offset_type  i) const
inlinevirtual

get an item by index

Implements CaloRecHitMetaCollectionV.

Definition at line 24 of file CaloRecHitMetaCollections.h.

References SimpleCaloRecHitMetaCollection< C >::coll_, and i.

24  {
25  return &(coll_[i]);
26  }
int i
Definition: DBlmapReader.cc:9
template<class C >
virtual const_iterator SimpleCaloRecHitMetaCollection< C >::find ( const DetId id) const
inlinevirtual

find by id (default version is very slow unsorted find)

Reimplemented from CaloRecHitMetaCollectionV.

Definition at line 15 of file CaloRecHitMetaCollections.h.

References SimpleCaloRecHitMetaCollection< C >::coll_, delta, CaloRecHitMetaCollectionV::end(), i, and j.

Referenced by HoECalculator::getHoE().

15  {
17  typename C::const_iterator j=coll_.find(id);
18  if (j!=coll_.end()) {
19  int delta=j-coll_.begin();
20  i=const_iterator(this,delta);
21  }
22  return i;
23  }
dbl * delta
Definition: mlp_gen.cc:36
int i
Definition: DBlmapReader.cc:9
const_iterator end() const
get the ending iterator
int j
Definition: DBlmapReader.cc:9
CaloRecHitMetaCollectionV::const_iterator const_iterator

Member Data Documentation

template<class C >
const C& SimpleCaloRecHitMetaCollection< C >::coll_
private