1 #ifndef DataFormats_Common_SortedCollection_h 2 #define DataFormats_Common_SortedCollection_h 49 template<
typename T,
typename SORT = StrictWeakOrdering<T> >
52 template<
typename T,
typename SORT>
57 template<
typename T,
typename SORT>
76 template<
typename T,
typename SORT>
83 typedef typename std::vector<T>::iterator
iterator;
92 typedef typename key_compare::key_type
key_type;
103 void push_back(
T const&
t);
104 #if defined(__GXX_EXPERIMENTAL_CXX0X__) 105 void push_back(
T &&
t) {
obj.push_back(
t);}
107 template<
typename... Args >
108 void emplace_back( Args&&...
args ) {
obj.emplace_back(
args...);}
114 void swap_contents(std::vector<T>& other);
119 size_type
size()
const;
121 void reserve(size_type
n);
127 const_reference
operator[](size_type i)
const;
131 iterator
find(key_type
k);
132 const_iterator
find(key_type k)
const;
134 const_iterator
begin()
const;
135 const_iterator
end()
const;
140 const_reference front()
const;
142 const_reference back()
const;
157 std::vector<void const*>& pointers,
160 void setPtr(std::type_info
const& toType,
162 void const*& ptr)
const;
165 std::vector<unsigned long>
const& indices,
166 std::vector<void const*>& ptrs)
const;
184 template<
typename T,
typename SORT>
188 template<
typename T,
typename SORT>
192 template<
typename T,
typename SORT>
196 template<
typename T,
typename SORT>
203 template<
typename T,
typename SORT>
210 template<
typename T,
typename SORT>
217 template<
typename T,
typename SORT>
226 template<
typename T,
typename SORT>
233 template<
typename T,
typename SORT>
240 template<
typename T,
typename SORT>
244 return obj.capacity();
247 template<
typename T,
typename SORT>
254 template<
typename T,
typename SORT>
261 template<
typename T,
typename SORT>
268 template<
typename T,
typename SORT>
281 return loc == last ||
comp(key, *loc) ? last :
loc;
284 template<
typename T,
typename SORT>
297 return loc == last ||
comp(key, *loc) ? last :
loc;
300 template<
typename T,
typename SORT>
307 template<
typename T,
typename SORT>
314 template<
typename T,
typename SORT>
321 template<
typename T,
typename SORT>
328 template<
typename T,
typename SORT>
335 template<
typename T,
typename SORT>
342 template<
typename T,
typename SORT>
349 template<
typename T,
typename SORT>
356 template<
typename T,
typename SORT>
364 template<
typename T,
typename SORT>
372 template<
typename T,
typename SORT>
376 std::vector<void const*>& pointers,
381 template<
typename T,
typename SORT>
386 void const*& ptr)
const {
390 template<
typename T,
typename SORT>
394 std::vector<unsigned long>
const& indices,
395 std::vector<void const*>& ptrs)
const {
400 template<
typename T,
typename SORT>
425 template<
typename T,
typename SORT,
typename ALLOC>
429 std::vector<T, ALLOC>
const&
v) {
437 template<
typename T,
typename SORT>
449 template<
typename T,
typename SORT>
454 std::vector<void const*>& pointers,
456 obj.
fillView(
id, pointers, helpers);
460 template<
typename T,
typename SORT>
464 std::type_info
const& toType,
467 obj.
setPtr(toType, index, ptr);
470 template<
typename T,
typename SORT>
474 std::type_info
const& toType,
475 std::vector<unsigned long>
const& indices,
476 std::vector<void const*>& ptrs) {
collection_type::iterator inner_iterator
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
bool operator()(T const &a, key_type b) const
void fillPtrVector(std::vector< T, A > const &obj, std::type_info const &iToType, std::vector< unsigned long > const &iIndicies, std::vector< void const * > &oPtr)
void reallyFillView(COLLECTION const &coll, ProductID const &id, std::vector< void const * > &ptrs, FillViewHelperVector &helpers)
std::vector< T >::const_iterator const_iterator
void swap(SortedCollection &other)
std::vector< EcalRecHit > collection_type
void push_back(T const &t)
#define CMS_CLASS_VERSION(_version_)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
void fillView(ProductID const &id, std::vector< void const * > &pointers, FillViewHelperVector &helpers) const
std::vector< T >::size_type size_type
void swap(Association< C > &lhs, Association< C > &rhs)
bool equal(const T &first, const T &second)
void setPtr(std::vector< T, A > const &obj, std::type_info const &iToType, unsigned long iIndex, void const *&oPtr)
bool operator()(key_type a, T const &b) const
void reallyfillPtrVector(COLLECTION const &coll, std::type_info const &iToType, std::vector< unsigned long > const &iIndicies, std::vector< void const * > &oPtr)
bool operator==(debugging_allocator< X > const &, debugging_allocator< Y > const &) noexcept
void swap_contents(std::vector< T > &other)
std::vector< T >::const_reference const_reference
key_compare::key_type key_type
void fillView(AssociationVector< KeyRefProd, CVal, KeyRef, SizeType, KeyReferenceHelper > const &obj, ProductID const &id, std::vector< void const * > &pointers, FillViewHelperVector &helpers)
bool operator()(T const &a, T const &b) const
T operator[](int i) const
const_reference front() const
def template(fileName, svg, replaceme="REPLACEME")
size_type capacity() const
void reallySetPtr(COLLECTION const &coll, std::type_info const &iToType, unsigned long iIndex, void const *&oPtr)
reference operator[](size_type i)
std::vector< T >::iterator iterator
const_iterator end() const
std::vector< T >::reference reference
iterator find(key_type k)
void setPtr(std::type_info const &toType, unsigned long index, void const *&ptr) const
void reserve(size_type n)
void fillPtrVector(std::type_info const &toType, std::vector< unsigned long > const &indices, std::vector< void const * > &ptrs) const
collection_type::const_iterator const_inner_iterator
std::vector< std::pair< edm::ProductID, unsigned long > > FillViewHelperVector
const_iterator begin() const
SortedCollection & operator=(SortedCollection const &rhs)
const_reference back() const