1 #ifndef DataFormats_Common_OwnArray_h 2 #define DataFormats_Common_OwnArray_h 11 #if defined CMS_USE_DEBUGGING_ALLOCATOR 23 template <
typename T,
unsigned int MAX_SIZE,
typename P = ClonePolicy<T> >
27 typedef std::vector<T*>
base;
102 #if defined(__GXX_EXPERIMENTAL_CXX0X__) 112 size_type
size()
const;
118 #if defined(__GXX_EXPERIMENTAL_CXX0X__) 126 template <
typename D>
void push_back(
D*
const& d);
127 template <
typename D>
void push_back(std::unique_ptr<D> d);
132 const_reference
back()
const;
134 const_reference
front()
const;
135 pointer
const *
data()
const;
146 std::vector<void const*>& pointers,
149 void setPtr(std::type_info
const& toType,
151 void const*& ptr)
const;
154 std::vector<unsigned long>
const& indices,
155 std::vector<void const*>& ptrs)
const;
167 return comp(*t1, *t2);
180 template<
typename T,
unsigned int M,
typename P>
184 template<
typename T,
unsigned int M,
typename P>
188 template<
typename T,
unsigned int M,
typename P>
195 #if defined(__GXX_EXPERIMENTAL_CXX0X__) 196 template<
typename T,
unsigned int M,
typename P>
202 template<
typename T,
unsigned int M,
typename P>
207 template<
typename T,
unsigned int M,
typename P>
214 #if defined(__GXX_EXPERIMENTAL_CXX0X__) 215 template<
typename T,
unsigned int M,
typename P>
223 template<
typename T,
unsigned int M,
typename P>
228 template<
typename T,
unsigned int M,
typename P>
233 template<
typename T,
unsigned int M,
typename P>
238 template<
typename T,
unsigned int M,
typename P>
243 template<
typename T,
unsigned int M,
typename P>
248 template<
typename T,
unsigned int M,
typename P>
253 template<
typename T,
unsigned int M,
typename P>
258 template<
typename T,
unsigned int M,
typename P>
263 template<
typename T,
unsigned int M,
typename P>
273 template<
typename T,
unsigned int M,
typename P>
285 template<
typename T,
unsigned int M,
typename P>
292 template<
typename T,
unsigned int M,
typename P>
298 template<
typename T,
unsigned int M,
typename P>
305 template <
typename T,
unsigned int M,
typename P>
310 template<
typename T,
unsigned int M,
typename P>
315 "In OwnArray::back() we have intercepted an attempt to dereference a null pointer\n" 316 "Since OwnArray is allowed to contain null pointers, you much assure that the\n" 317 "pointer at the end of the collection is not null before calling back()\n" 318 "if you wish to avoid this exception.\n" 319 "Consider using OwnArray::is_back_safe()\n");
324 template<
typename T,
unsigned int M,
typename P>
329 "In OwnArray::back() we have intercepted an attempt to dereference a null pointer\n" 330 "Since OwnArray is allowed to contain null pointers, you much assure that the\n" 331 "pointer at the end of the collection is not null before calling back()\n" 332 "if you wish to avoid this exception.\n" 333 "Consider using OwnArray::is_back_safe()\n");
338 template<
typename T,
unsigned int M,
typename P>
343 template<
typename T,
unsigned int M,
typename P>
348 template<
typename T,
unsigned int M,
typename P>
355 template<
typename T,
unsigned int M,
typename P>
360 template<
typename T,
unsigned int M,
typename P>
366 template<
typename T,
unsigned int M,
typename P>
376 template<
typename T,
unsigned int M,
typename P>
387 template<
typename T,
unsigned int M,
typename P>
template<
typename S>
392 template<
typename T,
unsigned int M,
typename P>
397 template<
typename T,
unsigned int M,
typename P>
402 template<
typename T,
unsigned int M,
typename P>
404 std::vector<void const*>& pointers,
410 pointers.reserve(numElements);
411 helpers.reserve(numElements);
417 "In OwnArray::fillView() we have intercepted an attempt to put a null pointer\n" 418 "into a View and that is not allowed. It is probably an error that the null\n" 419 "pointer was in the OwnArray in the first place.\n");
422 pointers.push_back(*
i);
423 holder_type
h(ref_type(
id, *
i, key,
this));
424 helpers.push_back(&h);
429 template<
typename T,
unsigned int M,
typename P>
438 template <
typename T,
unsigned int M,
typename P>
443 std::vector<void const*>& pointers,
445 obj.
fillView(
id, pointers, helpers);
449 template <
typename T,
unsigned int M,
typename P>
457 template <
typename T,
unsigned int M,
typename P>
462 void const*& ptr)
const {
463 detail::reallySetPtr<OwnArray<T,M,P> >(*
this, toType,
index, ptr);
466 template <
typename T,
unsigned int M,
typename P>
470 std::type_info
const& toType,
473 obj.
setPtr(toType, index, ptr);
476 template <
typename T,
unsigned int M,
typename P>
480 std::vector<unsigned long>
const& indices,
481 std::vector<void const*>& ptrs)
const {
486 template <
typename T,
unsigned int M,
typename P>
490 std::type_info
const& toType,
491 std::vector<unsigned long>
const& indices,
492 std::vector<void const*>& ptrs) {
497 template <
typename T,
unsigned int M,
typename P>
bool is_back_safe() const
pointer const * data() const
const_iterator & operator-=(difference_type d)
iterator operator+(difference_type n) const
bool operator<(const_iterator const &o) const
bool operator<(iterator const &o) const
const_iterator operator++(int)
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
reference operator[](size_type)
static Ordering< O > ordering(O const &comp)
bool operator!=(iterator const &ci) const
void setPtr(std::type_info const &toType, unsigned long index, void const *&ptr) const
const_iterator(iterator const &it)
const_iterator operator--(int)
#define CMS_CLASS_VERSION(_version_)
base::iterator::iterator_category iterator_category
size_type capacity() const
ptrdiff_t difference_type
bool operator!=(const_iterator const &ci) const
self & operator=(self const &)
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
void reallyfillPtrVector(COLLECTION const &coll, std::type_info const &iToType, std::vector< unsigned long > const &iIndicies, std::vector< void const * > &oPtr)
bool operator()(T const *t1, T const *t2) const
bool operator==(iterator const &ci) const
T const & const_reference
reference operator[](difference_type d) const
difference_type operator-(iterator const &o) const
base::const_iterator::iterator_category iterator_category
void fillPtrVector(std::type_info const &toType, std::vector< unsigned long > const &indices, std::vector< void const * > &ptrs) const
T const & operator*() const
def template(fileName, svg, replaceme="REPLACEME")
const_iterator & operator--()
const_iterator operator+(difference_type n) const
iterator operator-(difference_type n) const
DecomposeProduct< arg, typename Div::arg > D
const_iterator & operator+=(difference_type d)
bool operator==(const_iterator const &ci) const
std::pair< OmniClusterRef, TrackingParticleRef > P
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
const_iterator(pointer const *it)
const_iterator & operator++()
reference operator[](difference_type d) const
iterator erase(iterator pos)
ptrdiff_t difference_type
T const * operator->() const
T first(std::pair< T, U > const &p)
const_iterator operator-(difference_type n) const
std::vector< std::pair< edm::ProductID, unsigned long > > FillViewHelperVector
difference_type operator-(const_iterator const &o) const
void fillView(ProductID const &id, std::vector< void const * > &pointers, FillViewHelperVector &helpers) const