CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Friends
edm::PtrVector< T > Class Template Reference

#include <PtrVector.h>

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

Public Types

typedef void collection_type
 
typedef PtrVectorItr< Tconst_iterator
 
typedef PtrVectorItr< Titerator
 
typedef T member_type
 
typedef Ptr< Tvalue_type
 
- Public Types inherited from edm::PtrVectorBase
typedef unsigned long key_type
 
typedef key_type size_type
 

Public Member Functions

const_iterator begin () const
 
const_iterator end () const
 
void fillView (std::vector< void const * > &pointers, FillViewHelperVector &helpers) const
 
PtrVectoroperator= (PtrVector const &rhs)
 
Ptr< Toperator[] (unsigned long const iIndex) const
 
 PtrVector ()
 
 PtrVector (ProductID const &iId)
 
 PtrVector (PtrVector< T > const &iOther)
 
template<typename U >
 PtrVector (PtrVector< U > const &iOther)
 
void push_back (Ptr< T > const &iPtr)
 
template<typename U >
void push_back (Ptr< U > const &iPtr)
 
void swap (PtrVector &other)
 
- Public Member Functions inherited from edm::PtrVectorBase
size_type capacity () const
 Capacity of the RefVector. More...
 
void clear ()
 Clear the PtrVector. More...
 
bool empty () const
 Is the RefVector empty. More...
 
bool hasCache () const
 
ProductID id () const
 Accessor for product ID. More...
 
bool isAvailable () const
 
bool isNonnull () const
 Checks for non-null. More...
 
bool isNull () const
 Checks for null. More...
 
bool isTransient () const
 
bool operator! () const
 Checks for null. More...
 
bool operator== (PtrVectorBase const &iRHS) const
 
void const * product () const
 
EDProductGetter const * productGetter () const
 Accessor for product getter. More...
 
 PtrVectorBase (ProductID const &productID, void const *prodPtr=0, EDProductGetter const *prodGetter=0)
 
 PtrVectorBase (const PtrVectorBase &)
 
void reserve (size_type n)
 Reserve space for RefVector. More...
 
void setProductGetter (EDProductGetter *iGetter) const
 
size_type size () const
 Size of the RefVector. More...
 
virtual ~PtrVectorBase ()
 

Static Public Member Functions

static short Class_Version ()
 

Private Member Functions

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

Friends

class PtrVectorItr< T >
 

Additional Inherited Members

- Protected Member Functions inherited from edm::PtrVectorBase
template<typename TPtr >
TPtr makePtr (unsigned long iIndex) const
 
template<typename TPtr >
TPtr makePtr (std::vector< void const * >::const_iterator const iIt) const
 
 PtrVectorBase ()
 
void push_back_base (RefCore const &core, key_type iKey, void const *iData)
 
void swap (PtrVectorBase &other)
 swap More...
 
std::vector< void const * >::const_iterator void_begin () const
 
std::vector< void const * >::const_iterator void_end () const
 

Detailed Description

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

Definition at line 36 of file PtrVector.h.

Member Typedef Documentation

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

Definition at line 112 of file PtrVector.h.

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

Definition at line 108 of file PtrVector.h.

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

Definition at line 109 of file PtrVector.h.

template<typename T>
typedef T edm::PtrVector< T >::member_type

Definition at line 111 of file PtrVector.h.

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

Definition at line 110 of file PtrVector.h.

Constructor & Destructor Documentation

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

Definition at line 115 of file PtrVector.h.

template<typename T>
edm::PtrVector< T >::PtrVector ( ProductID const &  iId)
inlineexplicit

Definition at line 116 of file PtrVector.h.

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

Definition at line 117 of file PtrVector.h.

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

Definition at line 120 of file PtrVector.h.

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

Member Function Documentation

template<typename T>
const_iterator edm::PtrVector< T >::begin ( void  ) const
inline
template<typename T>
static short edm::PtrVector< T >::Class_Version ( )
inlinestatic

Definition at line 170 of file PtrVector.h.

172 :
173 
template<typename T>
const_iterator edm::PtrVector< T >::end ( void  ) const
inline
template<typename T >
void PtrVector::fillView ( std::vector< void const * > &  pointers,
FillViewHelperVector helpers 
) const

Definition at line 186 of file PtrVector.h.

References begin, MillePedeFileConverter_cfg::e, end, mps_fire::i, edm::Ptr< T >::id(), edm::Ptr< T >::isNull(), edm::Ptr< T >::key(), and findQualityFiles::size.

Referenced by edm::fillView().

187  {
188  pointers.reserve(this->size());
189  for (const_iterator i = begin(), e = end(); i != e; ++i) {
190  Ptr<T> ref = *i;
191  T const* address = ref.isNull() ? 0 : &*ref;
192  pointers.push_back(address);
193  helpers.push_back(FillViewHelperVector::value_type(ref.id(),ref.key()));
194  }
195  }
size_type size() const
Size of the RefVector.
Definition: PtrVectorBase.h:74
PtrVectorItr< T > const_iterator
Definition: PtrVector.h:108
const_iterator begin() const
Definition: PtrVector.h:130
const_iterator end() const
Definition: PtrVector.h:135
long double T
template<typename T>
Ptr<T> edm::PtrVector< T >::fromItr ( std::vector< void const * >::const_iterator const &  iItr) const
inlineprivate

Definition at line 178 of file PtrVector.h.

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

Definition at line 160 of file PtrVector.h.

160  {
161  PtrVector temp(rhs);
162  this->swap(temp);
163  return *this;
164  }
void swap(PtrVector &other)
Definition: PtrVector.h:156
template<typename T>
Ptr<T> edm::PtrVector< T >::operator[] ( unsigned long const  iIndex) const
inline

Definition at line 126 of file PtrVector.h.

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

Definition at line 141 of file PtrVector.h.

Referenced by reco::SuperCluster::addCluster(), l1t::HGCalClusterT< l1t::HGCalCluster >::addConstituent(), reco::SuperCluster::addPreshowerCluster(), HiEgammaSCEnergyCorrectionAlgo::applyCorrection(), ConvertedPhotonProducer::buildCollections(), CaloClusterVectorCopier(), EcalClusterPUCleaningTools::CleanedSuperCluster(), PFEGammaProducer::createSingleLegConversions(), pat::helper::BasicOverlapTest::fillOverlapsForItem(), pat::helper::OverlapBySuperClusterSeed::fillOverlapsForItem(), Multi5x5SuperClusterProducer::getClusterPtrVector(), HiSuperClusterProducer::getClusterPtrVector(), BremRecoveryClusterAlgo::makeIslandSuperClusters(), HiBremRecoveryClusterAlgo::makeIslandSuperClusters(), Multi5x5BremRecoveryClusterAlgo::makeIslandSuperClusters(), BremRecoveryClusterAlgo::makeSuperClusters(), HiBremRecoveryClusterAlgo::makeSuperClusters(), Multi5x5BremRecoveryClusterAlgo::makeSuperClusters(), HybridClusterAlgo::makeSuperClusters(), ConversionProducer::matchingSC(), helper::SelectionPtrViewAdder< T >::operator()(), reco::operator<<(), UncleanSCRecoveryProducer::produce(), pat::PATTauSlimmer::produce(), UnifiedSCCollectionProducer::produce(), EgammaHLTHybridClusterProducer::produce(), CleanAndMergeProducer::produce(), HybridClusterProducer::produce(), PreshowerPhiClusterProducer::produce(), PreshowerClusterProducer::produce(), HGCalClusterProducer::produce(), PFECALSuperClusterProducer::produce(), SimPFProducer::produce(), PFEGammaProducer::produce(), ConversionProducer::produce(), reco::modules::NamedCandCombiner< Selector, PairSelector, Cloner, Setup, Init >::produce(), pf2pat::TopProjectorAlgo< Top, Bottom >::ptrToAncestor(), ReducedEGProducer::relinkCaloClusters(), HGCClusterAlgo< FECODEC, DATA >::run(), and reco::SuperCluster::SuperCluster().

141  {
142  this->push_back_base(iPtr.refCore(),
143  iPtr.key(),
144  iPtr.hasProductCache() ? iPtr.operator->() : static_cast<void const*>(0));
145  }
void push_back_base(RefCore const &core, key_type iKey, void const *iData)
template<typename T>
template<typename U >
void edm::PtrVector< T >::push_back ( Ptr< U > const &  iPtr)
inline

Definition at line 148 of file PtrVector.h.

148  {
149  //check that types are assignable
150  BOOST_STATIC_ASSERT( (boost::is_base_of<T, U>::value) );
151  this->push_back_base(iPtr.refCore(),
152  iPtr.key(),
153  iPtr.hasProductCache() ? iPtr.operator->() : static_cast<void const*>(0));
154  }
void push_back_base(RefCore const &core, key_type iKey, void const *iData)
template<typename T>
void edm::PtrVector< T >::swap ( PtrVector< T > &  other)
inline

Definition at line 156 of file PtrVector.h.

Referenced by edm::swap().

156  {
157  this->PtrVectorBase::swap(other);
158  }
void swap(PtrVectorBase &other)
swap
template<typename T>
std::type_info const& edm::PtrVector< T >::typeInfo ( ) const
inlineprivatevirtual

Reimplemented from edm::PtrVectorBase.

Definition at line 175 of file PtrVector.h.

175 {return typeid(T);}
long double T

Friends And Related Function Documentation

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

Definition at line 114 of file PtrVector.h.