CMS 3D CMS Logo

Public Member Functions | Private Attributes

CaloRecHitMetaCollectionItemT< T > Class Template Reference

Inheritance diagram for CaloRecHitMetaCollectionItemT< T >:
CaloRecHitMetaCollectionItem

List of all members.

Public Member Functions

virtual const CaloRecHitat (int index) const
 CaloRecHitMetaCollectionItemT (const T *coll, int start)
virtual int find (const DetId &id) const
virtual ~CaloRecHitMetaCollectionItemT ()

Private Attributes

const T * m_collection
int m_start

Detailed Description

template<class T>
class CaloRecHitMetaCollectionItemT< T >

Definition at line 11 of file CaloRecHitMetaCollection.cc.


Constructor & Destructor Documentation

template<class T>
CaloRecHitMetaCollectionItemT< T >::CaloRecHitMetaCollectionItemT ( const T *  coll,
int  start 
) [inline]

Definition at line 13 of file CaloRecHitMetaCollection.cc.

: m_collection(coll),m_start(start) { }
template<class T>
virtual CaloRecHitMetaCollectionItemT< T >::~CaloRecHitMetaCollectionItemT ( ) [inline, virtual]

Definition at line 14 of file CaloRecHitMetaCollection.cc.

{ }

Member Function Documentation

template<class T>
virtual const CaloRecHit* CaloRecHitMetaCollectionItemT< T >::at ( int  index) const [inline, virtual]

Implements CaloRecHitMetaCollectionItem.

Definition at line 20 of file CaloRecHitMetaCollection.cc.

References CaloRecHitMetaCollectionItemT< T >::m_start.

                                                {
    return &((*m_collection)[index-m_start]);
  }
template<class T>
virtual int CaloRecHitMetaCollectionItemT< T >::find ( const DetId id) const [inline, virtual]

Implements CaloRecHitMetaCollectionItem.

Definition at line 15 of file CaloRecHitMetaCollection.cc.

References i, CaloRecHitMetaCollectionItemT< T >::m_collection, and CaloRecHitMetaCollectionItemT< T >::m_start.

                                          {
    typename T::const_iterator i;
    i=m_collection->find(id);
    return (i==m_collection->end())?(-1):(i-m_collection->begin()+m_start);
  }

Member Data Documentation

template<class T>
const T* CaloRecHitMetaCollectionItemT< T >::m_collection [private]
template<class T>
int CaloRecHitMetaCollectionItemT< T >::m_start [private]