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::RefToBaseVector< T > Class Template Reference

#include <EDProductfwd.h>

Public Types

typedef holder_type::const_iterator const_iterator
 
typedef
reftobase::BaseVectorHolder< T
holder_type
 
typedef T member_type
 
typedef holder_type::size_type size_type
 
typedef RefToBase< Tvalue_type
 

Public Member Functions

value_type at (size_type idx) const
 
const_iterator begin () const
 
void clear ()
 
bool empty () const
 
const_iterator end () const
 
void fillView (std::vector< void const * > &pointers) const
 
ProductID id () const
 
bool isAvailable () const
 
bool isInvalid () const
 
bool isValid () const
 
RefToBaseVectoroperator= (RefToBaseVector const &iRHS)
 
value_type operator[] (size_type idx) const
 
const void * product () const
 
EDProductGetter const * productGetter () const
 
void push_back (const RefToBase< T > &)
 
 RefToBaseVector ()
 
 RefToBaseVector (RefToBaseVector const &)
 
template<class REFV >
 RefToBaseVector (REFV const &)
 
template<typename C >
 RefToBaseVector (Handle< C > const &)
 
 RefToBaseVector (std::shared_ptr< reftobase::RefVectorHolderBase > p)
 
template<class T >
 RefToBaseVector (const RefToBaseVector< T > &iOther)
 
size_type size () const
 
void swap (RefToBaseVector &other)
 
std::auto_ptr
< reftobase::RefVectorHolderBase
vectorHolder () const
 
 ~RefToBaseVector ()
 

Static Public Member Functions

static short Class_Version ()
 

Private Attributes

holder_typeholder_
 

Detailed Description

template<class T>
class edm::RefToBaseVector< T >

RefToBase<T> provides a mechanism to refer to an object of type T (or which has T as a public base), held in a collection (of type not known to RefToBase<T>) which itself it in an Event.

Definition at line 27 of file EDProductfwd.h.

Member Typedef Documentation

Definition at line 31 of file RefToBaseVector.h.

Definition at line 29 of file RefToBaseVector.h.

template<class T>
typedef T edm::RefToBaseVector< T >::member_type

Definition at line 28 of file RefToBaseVector.h.

template<class T>
typedef holder_type::size_type edm::RefToBaseVector< T >::size_type

Definition at line 30 of file RefToBaseVector.h.

template<class T>
typedef RefToBase<T> edm::RefToBaseVector< T >::value_type

Definition at line 27 of file RefToBaseVector.h.

Constructor & Destructor Documentation

template<class T >
RefToBaseVector::RefToBaseVector ( )
inline

Definition at line 110 of file RefToBaseVector.h.

110  :
111  holder_(0)
112  { }
holder_type * holder_
template<class T>
edm::RefToBaseVector< T >::RefToBaseVector ( RefToBaseVector< T > const &  )
template<class T >
template<class REFV >
RefToBaseVector::RefToBaseVector ( REFV const &  iRef)
inlineexplicit

Definition at line 117 of file RefToBaseVector.h.

117  :
118  holder_(new reftobase::VectorHolder<T,REFV>(iRef))
119  { }
holder_type * holder_
template<typename T >
template<typename C >
RefToBaseVector::RefToBaseVector ( Handle< C > const &  h)
explicit

Definition at line 286 of file RefToBaseVector.h.

286  :
287  holder_(new reftobase::VectorHolder<T, RefVector<C, typename refhelper::ValueTrait<C>::value,
288  typename refhelper::FindTrait<C, T>::value> >(h.id())) {
289  }
holder_type * holder_
long double T
edm::RefVector< Container > RefVector
template<class T >
RefToBaseVector::RefToBaseVector ( std::shared_ptr< reftobase::RefVectorHolderBase p)
inline

Definition at line 129 of file RefToBaseVector.h.

129  :
130  holder_(new reftobase::IndirectVectorHolder<T>(p)) {
131  }
holder_type * holder_
template<class T >
RefToBaseVector::~RefToBaseVector ( )
inline

Definition at line 151 of file RefToBaseVector.h.

152  {
153  delete holder_;
154  }
holder_type * holder_
template<class T>
template<class T >
edm::RefToBaseVector< T >::RefToBaseVector ( const RefToBaseVector< T > &  iOther)
inline

Definition at line 123 of file RefToBaseVector.h.

123  :
124  holder_(iOther.holder_ ? iOther.holder_->clone() : 0)
125  { }
holder_type * holder_

Member Function Documentation

template<class T >
RefToBaseVector< T >::value_type RefToBaseVector::at ( size_type  idx) const
inline

Definition at line 159 of file RefToBaseVector.h.

References edm::reftobase::BaseVectorHolder< T >::at(), edm::errors::InvalidReference, and edm::Exception::throwThis().

160  {
161  if ( holder_ == 0 )
163  "Trying to dereference null RefToBaseVector<T> in method: at(",
164  idx,
165  ")\n");
166  return holder_->at( idx );
167  }
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
holder_type * holder_
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
virtual base_ref_type const at(size_type idx) const =0
template<class T >
RefToBaseVector< T >::const_iterator RefToBaseVector::begin ( void  ) const
inline
template<class T>
static short edm::RefToBaseVector< T >::Class_Version ( )
inlinestatic

Definition at line 71 of file RefToBaseVector.h.

73 :
reftobase::BaseVectorHolder< T > holder_type
holder_type * holder_
template<class T >
void RefToBaseVector::clear ( void  )
inline
template<class T >
bool RefToBaseVector::empty ( ) const
inline
template<class T >
RefToBaseVector< T >::const_iterator RefToBaseVector::end ( void  ) const
inline
template<typename T >
void RefToBaseVector::fillView ( std::vector< void const * > &  pointers) const

Definition at line 236 of file RefToBaseVector.h.

References begin, alignCSCRings::e, end, i, edm::RefToBase< T >::isNull(), and findQualityFiles::size.

Referenced by edm::fillView().

237  {
238  pointers.reserve(this->size());
239  for (const_iterator i=begin(), e=end(); i!=e; ++i) {
240  RefToBase<T> ref = * i;
241  member_type const * address = ref.isNull() ? 0 : & * ref;
242  pointers.push_back(address);
243  }
244  }
int i
Definition: DBlmapReader.cc:9
holder_type::const_iterator const_iterator
const_iterator end() const
size_type size() const
const_iterator begin() const
template<class T >
ProductID RefToBaseVector::id ( void  ) const
inline

Definition at line 205 of file RefToBaseVector.h.

References edm::reftobase::BaseVectorHolder< T >::id().

Referenced by MatchJet::operator()().

206  {
207  return holder_ ? holder_->id() : ProductID();
208  }
virtual ProductID id() const =0
holder_type * holder_
template<class T>
bool edm::RefToBaseVector< T >::isAvailable ( ) const
inline

Checks if collection is in memory or available in the Event. No type checking is done.

Definition at line 68 of file RefToBaseVector.h.

68 { return holder_->isAvailable(); }
virtual bool isAvailable() const =0
holder_type * holder_
template<class T>
bool edm::RefToBaseVector< T >::isInvalid ( ) const
inline

Definition at line 51 of file RefToBaseVector.h.

Referenced by edm::operator==().

51 { return holder_ == 0; }
holder_type * holder_
template<class T>
bool edm::RefToBaseVector< T >::isValid ( void  ) const
inline

Definition at line 50 of file RefToBaseVector.h.

Referenced by core.AutoHandle.AutoHandle::ReallyLoad().

50 { return holder_ != 0; }
holder_type * holder_
template<class T >
RefToBaseVector< T > & RefToBaseVector::operator= ( RefToBaseVector< T > const &  iRHS)
inline

Definition at line 136 of file RefToBaseVector.h.

References edm::swap(), and groupFilesInBlocks::temp.

136  {
137  RefToBaseVector temp(iRHS);
138  this->swap(temp);
139  return *this;
140  }
void swap(RefToBaseVector &other)
template<class T >
RefToBaseVector< T >::value_type RefToBaseVector::operator[] ( size_type  idx) const
inline

Definition at line 172 of file RefToBaseVector.h.

References asciidump::at.

173  {
174  return at( idx );
175  }
value_type at(size_type idx) const
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
template<typename T >
const void * RefToBaseVector::product ( ) const

Definition at line 273 of file RefToBaseVector.h.

References edm::reftobase::BaseVectorHolder< T >::product().

273  {
274  return holder_ ? holder_->product() : 0;
275  }
virtual void const * product() const =0
holder_type * holder_
template<class T >
EDProductGetter const * RefToBaseVector::productGetter ( ) const
inline

Definition at line 213 of file RefToBaseVector.h.

References edm::reftobase::BaseVectorHolder< T >::productGetter().

214  {
215  return holder_ ? holder_->productGetter() : 0;
216  }
virtual EDProductGetter const * productGetter() const =0
holder_type * holder_
template<typename T>
void RefToBaseVector::push_back ( const RefToBase< T > &  r)
template<class T >
RefToBaseVector< T >::size_type RefToBaseVector::size ( void  ) const
inline
template<class T >
void RefToBaseVector::swap ( RefToBaseVector< T > &  other)
inline

Definition at line 145 of file RefToBaseVector.h.

References edm::RefToBaseVector< T >::holder_, and std::swap().

Referenced by edm::swap().

145  {
146  std::swap(holder_, other.holder_);
147  }
holder_type * holder_
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
template<typename T >
std::auto_ptr< reftobase::RefVectorHolderBase > RefToBaseVector::vectorHolder ( ) const

Definition at line 268 of file RefToBaseVector.h.

References edm::reftobase::BaseVectorHolder< T >::vectorHolder().

Referenced by edm::helpers::ViewFiller< RefToBaseVector< T > >::fill().

268  {
269  return holder_ ? holder_->vectorHolder() : std::auto_ptr<reftobase::RefVectorHolderBase>();
270  }
holder_type * holder_
virtual std::auto_ptr< RefVectorHolderBase > vectorHolder() const =0

Member Data Documentation

template<class T>
holder_type* edm::RefToBaseVector< T >::holder_
private