CMS 3D CMS Logo

Public Types | Public Member Functions | Private Member Functions | Friends

edm::PtrVector< T > Class Template Reference

#include <PtrVector.h>

Inheritance diagram for edm::PtrVector< T >:
edm::PtrVectorBase

List of all members.

Public Types

typedef void collection_type
typedef PtrVectorItr< Tconst_iterator
typedef PtrVectorItr< Titerator
typedef Ptr< Tvalue_type

Public Member Functions

const_iterator begin () const
const_iterator end () const
void fillView (std::vector< void const * > &pointers) const
PtrVectoroperator= (PtrVector const &rhs)
Ptr< Toperator[] (unsigned long const iIndex) const
template<typename U >
 PtrVector (PtrVector< U > const &iOther)
 PtrVector (ProductID const &iId)
 PtrVector ()
 PtrVector (PtrVector< T > const &iOther)
void push_back (Ptr< T > const &iPtr)
template<typename U >
void push_back (Ptr< U > const &iPtr)
void swap (PtrVector &other)

Private Member Functions

Ptr< TfromItr (std::vector< void const * >::const_iterator const &iItr) const
std::type_info const & typeInfo () const

Friends

class PtrVectorItr< T >

Detailed Description

template<typename T>
class edm::PtrVector< T >

Definition at line 101 of file PtrVector.h.


Member Typedef Documentation

template<typename T>
typedef void edm::PtrVector< T >::collection_type

Definition at line 108 of file PtrVector.h.

template<typename T>
typedef PtrVectorItr<T> edm::PtrVector< T >::const_iterator

Definition at line 105 of file PtrVector.h.

template<typename T>
typedef PtrVectorItr<T> edm::PtrVector< T >::iterator

Definition at line 106 of file PtrVector.h.

template<typename T>
typedef Ptr<T> edm::PtrVector< T >::value_type

Definition at line 107 of file PtrVector.h.


Constructor & Destructor Documentation

template<typename T>
edm::PtrVector< T >::PtrVector ( ) [inline]

Definition at line 111 of file PtrVector.h.

template<typename T>
edm::PtrVector< T >::PtrVector ( ProductID const &  iId) [inline, explicit]

Definition at line 112 of file PtrVector.h.

: PtrVectorBase(iId) {}
template<typename T>
edm::PtrVector< T >::PtrVector ( PtrVector< T > const &  iOther) [inline]

Definition at line 113 of file PtrVector.h.

: PtrVectorBase(iOther) {}
template<typename T>
template<typename U >
edm::PtrVector< T >::PtrVector ( PtrVector< U > const &  iOther) [inline]

Definition at line 116 of file PtrVector.h.

                                         : PtrVectorBase(iOther) {
      BOOST_STATIC_ASSERT( (boost::is_base_of<T, U>::value) );
    }

Member Function Documentation

template<typename T>
const_iterator edm::PtrVector< T >::begin ( void  ) const [inline]
template<typename T>
const_iterator edm::PtrVector< T >::end ( void  ) const [inline]
template<typename T >
void PtrVector::fillView ( std::vector< void const * > &  pointers) const

Definition at line 181 of file PtrVector.h.

References begin, alignCSCRings::e, end, i, edm::Ptr< T >::isNull(), and findQualityFiles::size.

Referenced by edm::fillView().

                                                               {
    pointers.reserve(this->size());
    for (const_iterator i = begin(), e = end(); i != e; ++i) {
      Ptr<T> ref = *i;
      T const* address = ref.isNull() ? 0 : &*ref;
      pointers.push_back(address);
    }
  }
template<typename T>
Ptr<T> edm::PtrVector< T >::fromItr ( std::vector< void const * >::const_iterator const &  iItr) const [inline, private]

Definition at line 173 of file PtrVector.h.

                                                                           {
      return this->makePtr<Ptr<T> >(iItr);
    }
template<typename T>
PtrVector& edm::PtrVector< T >::operator= ( PtrVector< T > const &  rhs) [inline]

Definition at line 156 of file PtrVector.h.

                                               {
      PtrVector temp(rhs);
      this->swap(temp);
      return *this;
    }
template<typename T>
Ptr<T> edm::PtrVector< T >::operator[] ( unsigned long const  iIndex) const [inline]

Definition at line 122 of file PtrVector.h.

                                                         {
      return this->makePtr<Ptr<T> >(iIndex);
    }
template<typename T>
void edm::PtrVector< T >::push_back ( Ptr< T > const &  iPtr) [inline]

Definition at line 137 of file PtrVector.h.

Referenced by reco::SuperCluster::addCluster(), reco::SuperCluster::addPreshowerCluster(), HiEgammaSCEnergyCorrectionAlgo::applyCorrection(), FWLiteJetProducer::applyCuts(), ConvertedPhotonProducer::buildCollections(), CaloClusterVectorCopier(), EcalClusterPUCleaningTools::CleanedSuperCluster(), GEDPhotonCoreProducer::createSingleLegConversions(), PFHcalSuperClusterAlgo::doClusteringWorker(), pat::helper::BasicOverlapTest::fillOverlapsForItem(), pat::helper::OverlapBySuperClusterSeed::fillOverlapsForItem(), Multi5x5SuperClusterProducer::getClusterPtrVector(), SuperClusterProducer::getClusterPtrVector(), HiSuperClusterProducer::getClusterPtrVector(), reco::PFHcalSuperClusterInit::initialize(), BremRecoveryClusterAlgo::makeIslandSuperClusters(), HiBremRecoveryClusterAlgo::makeIslandSuperClusters(), Multi5x5BremRecoveryClusterAlgo::makeIslandSuperClusters(), HybridClusterAlgo::makeSuperClusters(), HiBremRecoveryClusterAlgo::makeSuperClusters(), BremRecoveryClusterAlgo::makeSuperClusters(), Multi5x5BremRecoveryClusterAlgo::makeSuperClusters(), ConversionProducer::matchingSC(), helper::SelectionPtrViewAdder< T >::operator()(), UnifiedSCCollectionProducer::produce(), HybridClusterProducer::produce(), ElectronRecalibSuperClusterAssociator::produce(), PreshowerClusterProducer::produce(), CleanAndMergeProducer::produce(), PFEGammaProducer::produce(), PreshowerPhiClusterProducer::produce(), UncleanSCRecoveryProducer::produce(), EgammaHLTHybridClusterProducer::produce(), reco::modules::NamedCandCombiner< Selector, PairSelector, Cloner, Setup, Init >::produce(), pf2pat::TopProjectorAlgo< Top, Bottom >::ptrToAncestor(), PFRootEventManager::reconstructCaloJets(), PFRootEventManager::reconstructGenJets(), PFRootEventManager::reconstructPFJets(), and reco::SuperCluster::SuperCluster().

                                       {
      this->push_back_base(iPtr.refCore(),
                           iPtr.key(),
                           iPtr.hasProductCache() ? iPtr.operator->() : static_cast<void const*>(0));
    }
template<typename T>
template<typename U >
void edm::PtrVector< T >::push_back ( Ptr< U > const &  iPtr) [inline]

Definition at line 144 of file PtrVector.h.

                                       {
      //check that types are assignable
      BOOST_STATIC_ASSERT( (boost::is_base_of<T, U>::value) );
      this->push_back_base(iPtr.refCore(),
                           iPtr.key(),
                           iPtr.hasProductCache() ? iPtr.operator->() : static_cast<void const*>(0));
    }
template<typename T>
void edm::PtrVector< T >::swap ( PtrVector< T > &  other) [inline]
template<typename T>
std::type_info const& edm::PtrVector< T >::typeInfo ( ) const [inline, private, virtual]

Reimplemented from edm::PtrVectorBase.

Definition at line 170 of file PtrVector.h.

{return typeid(T);}

Friends And Related Function Documentation

template<typename T>
friend class PtrVectorItr< T > [friend]

Definition at line 110 of file PtrVector.h.