1 #ifndef DataFormats_Common_RefVector_h
2 #define DataFormats_Common_RefVector_h
48 typedef std::vector<key_type>
KeyVec;
140 std::vector<void const*>& pointers,
153 refVector_.
swap(other.refVector_);
156 template <
typename C,
typename T,
typename F>
165 template <
typename C,
typename T,
typename F>
172 template <
typename C,
typename T,
typename F>
175 std::vector<void const*>& pointers,
181 pointers.reserve(this->
size());
187 pointers.push_back(address);
194 template <
typename C,
typename T,
typename F>
199 std::vector<void const*>& pointers,
202 obj.fillView(
id, pointers, helpers);
205 template <
typename C,
typename T,
typename F>
211 template <
typename C,
typename T,
typename F>
215 return lhs.refVector() == rhs.refVector();
218 template <
typename C,
typename T,
typename F>
222 return !(lhs == rhs);
225 template <
typename C,
typename T,
typename F>
227 typename RefVector<C, T, F>::iterator
230 typename contents_type::keys_type::iterator newPos =
237 template <
typename C,
typename T,
typename F>
242 template <
typename C,
typename T,
typename F>
247 template <
typename C,
typename T,
typename F>
249 operator<< (std::ostream& os, RefVector<C,T,F>
const&
r)
268 template <
typename C,
typename T,
typename F>
270 return isNull() ? 0 :
edm::template getProduct<C>(refVector_.refCore());
279 template<
typename C,
typename T,
typename F>
287 return coll.product();
bool isNonnull() const
Checks for non-null.
C const * product() const
Accessor for product collection.
value_type const const_reference
value_type::key_type key_type
void fillView(ProductID const &id, std::vector< void const * > &pointers, helper_vector &helpers) const
size_type capacity() const
Capacity of the RefVector.
bool empty() const
Is vector empty?
bool operator!=(debugging_allocator< X > const &, debugging_allocator< Y > const &)
const_reference reference
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 swap(RefVectorBase< KEY > &other)
swap two vectors
tuple obj
Example code starts here #.
size_type capacity() const
Capacity of vector.
ProductID id() const
Accessor for product ID.
std::vector< key_type > KeyVec
RefCore const & refCore() const
Accessor for product ID and product getter.
static const element_type * address(const iter &i)
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.
T const * getProduct(RefCore const &ref)
RefCore const & refCore() const
void reserve(size_type n)
Reserve space for RefVector.
EDProductGetter const * productGetter() const
Accessor for product getter.
RefVectorBase< key_type > contents_type
virtual void push_back(const RefHolderBase *r)=0
void clear()
Clear the vector.
static const C * product(const RefVector< C, T, F > &coll)
bool hasProductCache() const
Checks if product is in memory.
key_type key() const
Accessor for product key.
RefVector< C, T, F >::const_iterator iter
virtual void reserve(size_type n)=0
RefVector & operator=(RefVector const &rhs)
Copy assignment.
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.
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
boost::remove_cv< typename boost::remove_reference< argument_type >::type >::type key_type
contents_type const & refVector() const
Accessor for all data.
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
size_type size() const
Size of vector.
bool operator!() const
Checks for null.
edm::RefVector< Container > RefVector
RefVector(ProductID const &id)
void reserve(size_type n)
Reserve space for vector.
iterator erase(iterator const &pos)
Erase an element from the vector.