CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
edm::RefVectorBase< T > Class Template Reference

#include <EDProductfwd.h>

Public Types

typedef KEY key_type
 
typedef std::vector< KEY > keys_type
 
typedef keys_type::size_type size_type
 

Public Member Functions

size_type capacity () const
 Capacity of vector. More...
 
void clear ()
 clear the vector More...
 
bool empty () const
 Is vector empty? More...
 
keys_type::iterator eraseAtIndex (size_type index)
 erase an element from the vector More...
 
keys_type const & keys () const
 Accessor for vector of keys and pointers. More...
 
RefVectorBaseoperator= (RefVectorBase const &rhs)
 Copy assignment. More...
 
void pushBack (RefCore const &product, KEY const &key)
 
RefCore const & refCore () const
 Accessor for product ID and product getter. More...
 
 RefVectorBase ()
 Default constructor needed for reading from persistent store. Not for direct use. More...
 
 RefVectorBase (RefVectorBase const &rhs)
 
 RefVectorBase (ProductID const &productID, void const *prodPtr=0, EDProductGetter const *prodGetter=0)
 
void reserve (size_type n)
 Reserve space for vector. More...
 
size_type size () const
 Size of vector. More...
 
void swap (RefVectorBase< KEY > &other)
 swap two vectors More...
 
 ~RefVectorBase ()
 Destructor. More...
 

Static Public Member Functions

static short Class_Version ()
 

Private Attributes

keys_type keys_
 
RefCore product_
 

Detailed Description

template<typename T>
class edm::RefVectorBase< T >

Definition at line 27 of file EDProductfwd.h.

Member Typedef Documentation

template<typename T>
typedef KEY edm::RefVectorBase< T >::key_type

Definition at line 24 of file RefVectorBase.h.

template<typename T>
typedef std::vector<KEY > edm::RefVectorBase< T >::keys_type

Definition at line 23 of file RefVectorBase.h.

template<typename T>
typedef keys_type::size_type edm::RefVectorBase< T >::size_type

Definition at line 25 of file RefVectorBase.h.

Constructor & Destructor Documentation

template<typename T>
edm::RefVectorBase< T >::RefVectorBase ( )
inline

Default constructor needed for reading from persistent store. Not for direct use.

Definition at line 27 of file RefVectorBase.h.

27 : product_(), keys_() {}
template<typename T>
edm::RefVectorBase< T >::RefVectorBase ( RefVectorBase< T > const &  rhs)
inline

Definition at line 28 of file RefVectorBase.h.

28 : product_(rhs.product_), keys_(rhs.keys_) {}
template<typename T>
edm::RefVectorBase< T >::RefVectorBase ( ProductID const &  productID,
void const *  prodPtr = 0,
EDProductGetter const *  prodGetter = 0 
)
inlineexplicit

Definition at line 33 of file RefVectorBase.h.

34  :
35  product_(productID, prodPtr, prodGetter, false), keys_() {}
template<typename T>
edm::RefVectorBase< T >::~RefVectorBase ( )
inline

Destructor.

Definition at line 38 of file RefVectorBase.h.

38 {}

Member Function Documentation

template<typename T>
size_type edm::RefVectorBase< T >::capacity ( ) const
inline

Capacity of vector.

Definition at line 58 of file RefVectorBase.h.

Referenced by edm::RefVector< CATopJetTagInfoCollection >::capacity().

58 {return keys_.capacity();}
template<typename T>
static short edm::RefVectorBase< T >::Class_Version ( )
inlinestatic

Definition at line 95 of file RefVectorBase.h.

97 :
98  RefCore product_;
template<typename T>
void edm::RefVectorBase< T >::clear ( void  )
inline
template<typename T>
bool edm::RefVectorBase< T >::empty ( ) const
inline
template<typename T>
keys_type::iterator edm::RefVectorBase< T >::eraseAtIndex ( size_type  index)
inline

erase an element from the vector

Definition at line 64 of file RefVectorBase.h.

Referenced by edm::RefVector< C, T, F >::erase().

64  {
65  return keys_.erase(keys_.begin() + index);
66  }
template<typename T>
keys_type const& edm::RefVectorBase< T >::keys ( ) const
inline
template<typename T>
RefVectorBase& edm::RefVectorBase< T >::operator= ( RefVectorBase< T > const &  rhs)
inline

Copy assignment.

Definition at line 81 of file RefVectorBase.h.

81  {
82  RefVectorBase temp(rhs);
83  this->swap(temp);
84  return *this;
85  }
RefVectorBase()
Default constructor needed for reading from persistent store. Not for direct use. ...
Definition: RefVectorBase.h:27
void swap(RefVectorBase< KEY > &other)
swap two vectors
Definition: RefVectorBase.h:75
template<typename T>
void edm::RefVectorBase< T >::pushBack ( RefCore const &  product,
KEY const &  key 
)
inline

Definition at line 52 of file RefVectorBase.h.

Referenced by edm::RefVector< CATopJetTagInfoCollection >::push_back().

52  {
53  product_.pushBackItem(product, true);
54  keys_.push_back(key);
55  }
void pushBackItem(RefCore const &productToBeInserted, bool checkPointer)
Definition: RefCore.cc:133
list key
Definition: combine.py:13
template<typename T>
RefCore const& edm::RefVectorBase< T >::refCore ( ) const
inline
template<typename T>
void edm::RefVectorBase< T >::reserve ( size_type  n)
inline

Reserve space for vector.

Definition at line 61 of file RefVectorBase.h.

Referenced by edm::RefVector< CATopJetTagInfoCollection >::reserve().

61 {keys_.reserve(n);}
template<typename T>
size_type edm::RefVectorBase< T >::size ( void  ) const
inline

Size of vector.

Definition at line 50 of file RefVectorBase.h.

Referenced by edm::RefVector< CATopJetTagInfoCollection >::size().

50 {return keys_.size();}
template<typename T>
void edm::RefVectorBase< T >::swap ( RefVectorBase< KEY > &  other)
inline

swap two vectors

Definition at line 75 of file RefVectorBase.h.

Referenced by edm::RefVectorBase< key_type >::operator=(), and edm::RefVector< C, T, F >::swap().

75  {
76  product_.swap(other.product_);
77  keys_.swap(other.keys_);
78  }
void swap(RefCore &)
Definition: RefCore.h:116

Member Data Documentation

template<typename T>
keys_type edm::RefVectorBase< T >::keys_
private
template<typename T>
RefCore edm::RefVectorBase< T >::product_
private