1 #ifndef DataFormats_Common_RefVector_h
2 #define DataFormats_Common_RefVector_h
45 typedef std::vector<key_type>
KeyVec;
156 std::vector<void const*>& pointers,
171 refVector_.
swap(other.refVector_);
174 template<
typename C,
typename T,
typename F>
183 template<
typename C,
typename T,
typename F>
190 template<
typename C,
typename T,
typename F>
193 std::vector<void const*>& pointers,
196 pointers.reserve(this->
size());
197 helpers.reserve(this->
size());
202 pointers.push_back(address);
203 helpers.emplace_back(
i->id(),
i->key());
207 template<
typename C,
typename T,
typename F>
212 std::vector<void const*>& pointers,
214 obj.fillView(
id, pointers, helpers);
217 template<
typename C,
typename T,
typename F>
222 template<
typename C,
typename T,
typename F>
226 return lhs.refVector() == rhs.refVector();
229 template<
typename C,
typename T,
typename F>
233 return !(lhs == rhs);
236 template<
typename C,
typename T,
typename F>
238 typename RefVector<C, T, F>::iterator
241 typename contents_type::keys_type::iterator newPos =
247 template<
typename C,
typename T,
typename F>
252 template<
typename C,
typename T,
typename F>
257 template<
typename C,
typename T,
typename F>
274 if(!(*
this)[
i].isAvailable()) {
281 template<
typename C,
typename T,
typename F>
283 operator<<(std::ostream& os, RefVector<C,T,F>
const&
r) {
299 template<
typename C,
typename T,
typename F>
void const * cachedMemberPointer(size_type idx) const
bool isNonnull() const
Checks for non-null.
void setProductPtr(void const *prodPtr) const
value_type const const_reference
value_type::key_type key_type
size_type capacity() const
Capacity of the RefVector.
bool empty() const
Is vector empty?
RefCore const & refCore() const
bool operator!=(debugging_allocator< X > const &, debugging_allocator< Y > const &)
const_reference reference
key_type key() const
Accessor for product key.
keys_type::iterator eraseAtIndex(size_type index)
erase an element from the vector
#define CMS_CLASS_VERSION(_version_)
const_iterator end() const
Termination of iteration.
bool empty() const
Is the RefVector empty.
const_iterator begin() const
Initialize an iterator over the RefVector.
void pushBack(RefCore const &product, KEY const &key)
KeyVec::size_type size_type
bool isNull() const
Checks for null.
void fillView(ProductID const &id, std::vector< void const * > &pointers, FillViewHelperVector &helpers) const
size_type capacity() const
Capacity of vector.
ProductID id() const
Accessor for product ID.
RefVector(ProductID const &iId)
std::vector< key_type > KeyVec
RefCore const & refCore() const
Accessor for product ID and product getter.
bool operator==(debugging_allocator< X > const &, debugging_allocator< Y > const &)
bool isTransient() const
Checks if product collection is tansient (i.e. non persistable)
void const * productPtr() const
refhelper::RefVectorTrait< C, T, F >::iterator_type iterator
void clear()
clear the vector
void swap(RefVector< C, T, F > &other)
Swap two vectors.
keys_type const & keys() const
Accessor for vector of keys and pointers.
RefVector(RefVector const &rh)
void reserve(size_type n)
Reserve space for RefVector.
EDProductGetter const * productGetter() const
Accessor for product getter.
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
RefVectorBase< key_type > contents_type
RefVector & operator=(RefVector &&rhs)
void clear()
Clear the vector.
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
bool hasProductCache() const
Checks if product is in memory.
RefVector< C, T, F >::const_iterator iter
EDProductGetter const * productGetter() const
value_type const operator[](size_type idx) const
Retrieve an element of the RefVector.
value_type const at(size_type idx) const
Retrieve an element of the RefVector.
static element_type const * address(iter const &i)
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
keys_type::size_type size_type
size_type size() const
Size of the RefVector.
refhelper::RefVectorTrait< C, T, F >::ref_type value_type
RefVector & operator=(RefVector const &rhs)
contents_type const & refVector() const
Accessor for all data.
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
size_type size() const
Size of vector.
std::vector< std::pair< edm::ProductID, unsigned long > > FillViewHelperVector
bool operator!() const
Checks for null.
edm::RefVector< Container > RefVector
void reserve(size_type n)
Reserve space for vector.
boost::remove_cv< typename boost::remove_reference< argument_type >::type >::type key_type
RefVector(RefVector &&rh)
void swap(RefVectorBase< KEY > &other) noexcept
swap two vectors
iterator erase(iterator const &pos)
Erase an element from the vector.