1 #ifndef DataFormats_Common_RefVector_h
2 #define DataFormats_Common_RefVector_h
46 typedef std::vector<key_type>
KeyVec;
56 #if defined(__GXX_EXPERIMENTAL_CXX0X__)
146 #if defined(__GXX_EXPERIMENTAL_CXX0X__)
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 #if defined(__GXX_EXPERIMENTAL_CXX0X__)
191 template<
typename C,
typename T,
typename F>
194 std::vector<void const*>& pointers,
197 pointers.reserve(this->
size());
198 helpers.reserve(this->
size());
203 pointers.push_back(address);
204 helpers.emplace_back(
i->id(),
i->key());
209 template<
typename C,
typename T,
typename F>
214 std::vector<void const*>& pointers,
216 obj.fillView(
id, pointers, helpers);
219 template<
typename C,
typename T,
typename F>
224 template<
typename C,
typename T,
typename F>
228 return lhs.refVector() == rhs.refVector();
231 template<
typename C,
typename T,
typename F>
235 return !(lhs == rhs);
238 template<
typename C,
typename T,
typename F>
240 typename RefVector<C, T, F>::iterator
243 typename contents_type::keys_type::iterator newPos =
249 template<
typename C,
typename T,
typename F>
254 template<
typename C,
typename T,
typename F>
259 template<
typename C,
typename T,
typename F>
276 if(!(*
this)[
i].isAvailable()) {
283 template<
typename C,
typename T,
typename F>
285 operator<<(std::ostream& os, RefVector<C,T,F>
const&
r) {
301 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 swap(RefVectorBase< KEY > &other)
swap two vectors
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
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
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.
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
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
iterator erase(iterator const &pos)
Erase an element from the vector.