1 #ifndef DataFormats_Common_RefVector_h
2 #define DataFormats_Common_RefVector_h
48 typedef std::vector<key_type>
KeyVec;
58 #if defined(__GXX_EXPERIMENTAL_CXX0X__)
140 #if defined(__GXX_EXPERIMENTAL_CXX0X__)
150 std::vector<void const*>& pointers,
163 refVector_.
swap(other.refVector_);
166 template<
typename C,
typename T,
typename F>
175 template<
typename C,
typename T,
typename F>
182 template<
typename C,
typename T,
typename F>
185 std::vector<void const*>& pointers,
190 pointers.reserve(this->
size());
196 pointers.push_back(address);
197 holder_type
h(ref_type(
i->id(), address,
i->key(),
product()));
202 template<
typename C,
typename T,
typename F>
207 std::vector<void const*>& pointers,
209 obj.fillView(
id, pointers, helpers);
212 template<
typename C,
typename T,
typename F>
217 template<
typename C,
typename T,
typename F>
221 return lhs.refVector() == rhs.refVector();
224 template<
typename C,
typename T,
typename F>
228 return !(lhs == rhs);
231 template<
typename C,
typename T,
typename F>
233 typename RefVector<C, T, F>::iterator
236 typename contents_type::keys_type::iterator newPos =
243 template<
typename C,
typename T,
typename F>
248 template<
typename C,
typename T,
typename F>
253 template<
typename C,
typename T,
typename F>
255 operator<<(std::ostream& os, RefVector<C,T,F>
const&
r) {
271 template<
typename C,
typename T,
typename F>
273 return isNull() ? 0 :
edm::template getProduct<C>(refVector_.refCore());
281 template<
typename C,
typename T,
typename F>
289 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.
static C const * product(RefVector< C, T, F > const &coll)
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.
size_type capacity() const
Capacity of vector.
void swap(RefVector< C, T, F > &other) noexcept
Swap two vectors.
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
keys_type const & keys() const
Accessor for vector of keys and pointers.
T const * getProduct(RefCore const &ref)
RefCore const & refCore() const
RefVector(RefVector const &rh)
void reserve(size_type n)
Reserve space for RefVector.
EDProductGetter const * productGetter() const
Accessor for product getter.
RefVectorBase< key_type > contents_type
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
void clear()
Clear the vector.
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
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.
reftobase::RefVectorHolderBase helper_vector
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.
virtual void push_back(RefHolderBase const *r)=0
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.
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
size_type size() const
Size of vector.
bool operator!() const
Checks for null.
edm::RefVector< Container > RefVector
void reserve(size_type n)
Reserve space for vector.
void swap(RefVectorBase< KEY > &other) noexcept
swap two vectors
iterator erase(iterator const &pos)
Erase an element from the vector.