CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

SimpleCaloRecHitMetaCollection< C > Class Template Reference

#include <CaloRecHitMetaCollections.h>

Inheritance diagram for SimpleCaloRecHitMetaCollection< C >:
CaloRecHitMetaCollectionV

List of all members.

Public Types

typedef
CaloRecHitMetaCollectionV::const_iterator 
const_iterator

Public Member Functions

virtual const CaloRecHitat (const_iterator::offset_type i) const
 get an item by index
virtual const_iterator find (const DetId &id) const
 find by id (default version is very slow unsorted find)
 SimpleCaloRecHitMetaCollection (const C &c)
 SimpleCaloRecHitMetaCollection (const C *c)

Private Attributes

const C & coll_

Detailed Description

template<class C>
class SimpleCaloRecHitMetaCollection< C >

Definition at line 9 of file CaloRecHitMetaCollections.h.


Member Typedef Documentation

Reimplemented from CaloRecHitMetaCollectionV.

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 [inline, virtual]

get an item by index

Implements CaloRecHitMetaCollectionV.

Definition at line 24 of file CaloRecHitMetaCollections.h.

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

                                                                  {
    return &(coll_[i]);
  }
template<class C >
virtual const_iterator SimpleCaloRecHitMetaCollection< C >::find ( const DetId id) const [inline, virtual]

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().

                                                     {
    const_iterator i=end();
    typename C::const_iterator j=coll_.find(id);
    if (j!=coll_.end()) {
      int delta=j-coll_.begin();
      i=const_iterator(this,delta);
    }
    return i;
  }

Member Data Documentation

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