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 (const PtrVectorBase &)
 
 PtrVectorBase (ProductID const &productID, void const *prodPtr=nullptr, EDProductGetter const *prodGetter=nullptr)
 
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 override
 

Friends

class PtrVectorItr< T >
 

Additional Inherited Members

- Protected Member Functions inherited from edm::PtrVectorBase
template<typename TPtr >
TPtr makePtr (std::vector< void const * >::const_iterator const iIt) const
 
template<typename TPtr >
TPtr makePtr (unsigned long iIndex) 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

◆ collection_type

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

Definition at line 128 of file PtrVector.h.

◆ const_iterator

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

Definition at line 124 of file PtrVector.h.

◆ iterator

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

Definition at line 125 of file PtrVector.h.

◆ member_type

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

Definition at line 127 of file PtrVector.h.

◆ value_type

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

Definition at line 126 of file PtrVector.h.

Constructor & Destructor Documentation

◆ PtrVector() [1/4]

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

Definition at line 131 of file PtrVector.h.

131 : PtrVectorBase() {}

◆ PtrVector() [2/4]

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

Definition at line 132 of file PtrVector.h.

132 : PtrVectorBase(iId) {}

◆ PtrVector() [3/4]

template<typename T>
edm::PtrVector< T >::PtrVector ( PtrVector< T > const &  iOther)
inline

Definition at line 133 of file PtrVector.h.

133 : PtrVectorBase(iOther) {}

◆ PtrVector() [4/4]

template<typename T>
template<typename U >
edm::PtrVector< T >::PtrVector ( PtrVector< U > const &  iOther)
inline

Definition at line 136 of file PtrVector.h.

136  : PtrVectorBase(iOther) {
137  static_assert(std::is_base_of<T, U>::value, "PtrVector being copied is not of compatible type");
138  }

Member Function Documentation

◆ begin()

template<typename T>
const_iterator edm::PtrVector< T >::begin ( void  ) const
inline

◆ Class_Version()

template<typename T>
static short edm::PtrVector< T >::Class_Version ( )
inlinestatic

Definition at line 174 of file PtrVector.h.

176 :
177  //PtrVector const& operator=(PtrVector const&); // stop default

◆ end()

template<typename T>
const_iterator edm::PtrVector< T >::end ( void  ) const
inline

◆ fillView()

template<typename T >
void PtrVector::fillView ( std::vector< void const * > &  pointers,
FillViewHelperVector helpers 
) const

Definition at line 185 of file PtrVector.h.

185  {
186  pointers.reserve(this->size());
187  for (const_iterator i = begin(), e = end(); i != e; ++i) {
188  Ptr<T> ref = *i;
189  T const* address = ref.isNull() ? nullptr : &*ref;
190  pointers.push_back(address);
191  helpers.push_back(FillViewHelperVector::value_type(ref.id(), ref.key()));
192  }
193  }

◆ fromItr()

template<typename T>
Ptr<T> edm::PtrVector< T >::fromItr ( std::vector< void const * >::const_iterator const &  iItr) const
inlineprivate

Definition at line 181 of file PtrVector.h.

181 { return this->makePtr<Ptr<T> >(iItr); }

◆ operator=()

template<typename T>
PtrVector& edm::PtrVector< T >::operator= ( PtrVector< T > const &  rhs)
inline

Definition at line 165 of file PtrVector.h.

165  {
166  PtrVector temp(rhs);
167  this->swap(temp);
168  return *this;
169  }

◆ operator[]()

template<typename T>
Ptr<T> edm::PtrVector< T >::operator[] ( unsigned long const  iIndex) const
inline

Definition at line 142 of file PtrVector.h.

142 { return this->makePtr<Ptr<T> >(iIndex); }

◆ push_back() [1/2]

template<typename T>
void edm::PtrVector< T >::push_back ( Ptr< T > const &  iPtr)
inline

Definition at line 149 of file PtrVector.h.

149  {
150  this->push_back_base(
151  iPtr.refCore(), iPtr.key(), iPtr.hasProductCache() ? iPtr.operator->() : static_cast<void const*>(nullptr));
152  }

Referenced by reco::SuperCluster::addCluster(), 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()(), UncleanSCRecoveryProducer::produce(), UnifiedSCCollectionProducer::produce(), CleanAndMergeProducer::produce(), pat::PATTauSlimmer::produce(), MultiClustersFromTrackstersProducer::produce(), HybridClusterProducer::produce(), PreshowerPhiClusterProducer::produce(), PreshowerClusterProducer::produce(), HGCalMultiClusterProducer::produce(), PFEGammaProducer::produce(), HGCalLayerClusterProducer::produce(), PFECALSuperClusterProducer::produce(), and ReducedEGProducer::relinkCaloClusters().

◆ push_back() [2/2]

template<typename T>
template<typename U >
void edm::PtrVector< T >::push_back ( Ptr< U > const &  iPtr)
inline

Definition at line 155 of file PtrVector.h.

155  {
156  //check that types are assignable
157  static_assert(std::is_base_of<T, U>::value,
158  "Ptr used in push_back can not be converted to type used by PtrVector.");
159  this->push_back_base(
160  iPtr.refCore(), iPtr.key(), iPtr.hasProductCache() ? iPtr.operator->() : static_cast<void const*>(nullptr));
161  }

◆ swap()

template<typename T>
void edm::PtrVector< T >::swap ( PtrVector< T > &  other)
inline

Definition at line 163 of file PtrVector.h.

163 { this->PtrVectorBase::swap(other); }

Referenced by edm::PtrVector< reco::CaloCluster >::operator=(), and edm::swap().

◆ typeInfo()

template<typename T>
std::type_info const& edm::PtrVector< T >::typeInfo ( ) const
inlineoverrideprivatevirtual

Reimplemented from edm::PtrVectorBase.

Definition at line 178 of file PtrVector.h.

178 { return typeid(T); }

Friends And Related Function Documentation

◆ PtrVectorItr< T >

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

Definition at line 130 of file PtrVector.h.

mps_fire.i
i
Definition: mps_fire.py:355
edm::PtrVectorBase::size
size_type size() const
Size of the RefVector.
Definition: PtrVectorBase.h:73
edm::PtrVectorBase::push_back_base
void push_back_base(RefCore const &core, key_type iKey, void const *iData)
Definition: PtrVectorBase.cc:62
edm::PtrVector::begin
const_iterator begin() const
Definition: PtrVector.h:144
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
edm::PtrVector::const_iterator
PtrVectorItr< T > const_iterator
Definition: PtrVector.h:124
edm::PtrVector::swap
void swap(PtrVector &other)
Definition: PtrVector.h:163
helpers
Definition: makeCompositeCandidate.h:8
edm::PtrVector::end
const_iterator end() const
Definition: PtrVector.h:146
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition: JetExtendedAssociation.h:30
edm::PtrVectorBase::PtrVectorBase
PtrVectorBase()
Definition: PtrVectorBase.cc:35
edm::PtrVectorBase::void_end
std::vector< void const * >::const_iterator void_end() const
Definition: PtrVectorBase.h:121
T
long double T
Definition: Basic3DVectorLD.h:48
relativeConstraints.value
value
Definition: relativeConstraints.py:53
edm::PtrVectorBase::void_begin
std::vector< void const * >::const_iterator void_begin() const
Definition: PtrVectorBase.h:114
PtrVector
edm::PtrVectorBase::swap
void swap(PtrVectorBase &other)
swap
Definition: PtrVectorBase.cc:56
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37