1 #ifndef DataFormats_Common_PtrVectorBase_h 2 #define DataFormats_Common_PtrVectorBase_h 107 std::vector<void const*>::const_iterator
void_begin()
const {
112 return (*cachedItems_).begin();
114 std::vector<void const*>::const_iterator
void_end()
const {
119 return (*cachedItems_).end();
122 template<
typename TPtr>
125 return TPtr(reinterpret_cast<typename TPtr::value_type const*>((*
cachedItems_)[iIndex]),
129 return TPtr(this->
id(),
130 reinterpret_cast<typename TPtr::value_type const*>((*
cachedItems_)[iIndex]),
136 template<
typename TPtr>
137 TPtr
makePtr(std::vector<void const*>::const_iterator
const iIt)
const {
139 return TPtr(reinterpret_cast<typename TPtr::value_type const*>(*iIt),
140 indicies_[iIt - (*cachedItems_).begin()]);
143 return TPtr(this->
id(),
144 reinterpret_cast<typename TPtr::value_type const*>(*iIt),
145 indicies_[iIt - (*cachedItems_).begin()]);
164 static const std::vector<void const*>&
emptyCache();
void push_back_base(RefCore const &core, key_type iKey, void const *iData)
size_type size() const
Size of the RefVector.
std::vector< void const * >::const_iterator void_begin() const
PtrVectorBase(ProductID const &productID, void const *prodPtr=0, EDProductGetter const *prodGetter=0)
bool isNull() const
Checks for null.
bool checkCachedItems() const
TPtr makePtr(unsigned long iIndex) const
PtrVectorBase & operator=(const PtrVectorBase &)
bool empty() const
Is the RefVector empty.
void swap(PtrVectorBase &other)
swap
virtual std::type_info const & typeInfo() const
static const std::vector< void const * > & emptyCache()
ProductID id() const
Accessor for product ID.
bool operator!() const
Checks for null.
bool isNonnull() const
Checks for non-null.
std::vector< key_type > indicies_
std::atomic< std::vector< void const * > * > cachedItems_
bool operator==(PtrVectorBase const &iRHS) const
void setProductGetter(EDProductGetter *iGetter) const
size_type capacity() const
Capacity of the RefVector.
std::vector< void const * >::const_iterator void_end() const
TPtr makePtr(std::vector< void const * >::const_iterator const iIt) const
EDProductGetter const * productGetter() const
void reserve(size_type n)
Reserve space for RefVector.
void clear()
Clear the PtrVector.
void setProductGetter(EDProductGetter const *prodGetter) const
EDProductGetter const * productGetter() const
Accessor for product getter.
void const * product() const