CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Attributes
edm::reftobase::IndirectVectorHolder< T > Class Template Reference

#include <IndirectHolder.h>

Inheritance diagram for edm::reftobase::IndirectVectorHolder< T >:
edm::reftobase::BaseVectorHolder< T >

Classes

struct  const_iterator_imp_specific
 

Public Types

typedef base_type::base_ref_type base_ref_type
 
typedef BaseVectorHolder< Tbase_type
 
typedef base_type::const_iterator const_iterator
 
typedef base_type::element_type element_type
 
typedef base_type::size_type size_type
 
- Public Types inherited from edm::reftobase::BaseVectorHolder< T >
typedef RefToBase< Tbase_ref_type
 
typedef T element_type
 
typedef size_t size_type
 

Public Member Functions

base_ref_type const at (size_type idx) const override
 
const_iterator begin () const override
 
void clear () override
 
BaseVectorHolder< T > * clone () const override
 
BaseVectorHolder< T > * cloneEmpty () const override
 
bool empty () const override
 
const_iterator end () const override
 
ProductID id () const override
 
 IndirectVectorHolder ()
 
 IndirectVectorHolder (const IndirectVectorHolder &other)
 
 IndirectVectorHolder (std::shared_ptr< RefVectorHolderBase > p)
 
 IndirectVectorHolder (RefVectorHolderBase *p)
 
bool isAvailable () const override
 
IndirectVectorHolderoperator= (IndirectVectorHolder const &rhs)
 
EDProductGetter const * productGetter () const override
 
void push_back (const BaseHolder< T > *r) override
 
size_type size () const override
 
void swap (IndirectVectorHolder &other)
 
std::unique_ptr< reftobase::RefVectorHolderBasevectorHolder () const override
 
 ~IndirectVectorHolder () override
 
- Public Member Functions inherited from edm::reftobase::BaseVectorHolder< T >
 BaseVectorHolder ()
 
virtual void push_back (BaseHolder< T > const *)=0
 
void swap (BaseVectorHolder &)
 
virtual ~BaseVectorHolder ()
 

Static Public Member Functions

static short Class_Version ()
 
- Static Public Member Functions inherited from edm::reftobase::BaseVectorHolder< T >
static short Class_Version ()
 

Private Types

typedef base_type::const_iterator_imp const_iterator_imp
 

Private Attributes

RefVectorHolderBasehelper_
 

Detailed Description

template<typename T>
class edm::reftobase::IndirectVectorHolder< T >

Definition at line 15 of file IndirectHolder.h.

Member Typedef Documentation

Definition at line 18 of file IndirectVectorHolder.h.

Definition at line 15 of file IndirectVectorHolder.h.

Definition at line 19 of file IndirectVectorHolder.h.

Definition at line 56 of file IndirectVectorHolder.h.

Definition at line 17 of file IndirectVectorHolder.h.

Definition at line 16 of file IndirectVectorHolder.h.

Constructor & Destructor Documentation

Definition at line 102 of file IndirectVectorHolder.h.

102 : BaseVectorHolder<T>(), helper_( nullptr ) { }
template<typename T >
edm::reftobase::IndirectVectorHolder< T >::IndirectVectorHolder ( const IndirectVectorHolder< T > &  other)

Definition at line 113 of file IndirectVectorHolder.h.

113  :
114  BaseVectorHolder<T>(), helper_( other.helper_->clone() ) { }
template<typename T >
edm::reftobase::IndirectVectorHolder< T >::IndirectVectorHolder ( std::shared_ptr< RefVectorHolderBase p)

Definition at line 105 of file IndirectVectorHolder.h.

105  :
106  BaseVectorHolder<T>(), helper_(p->clone()) { }

Definition at line 109 of file IndirectVectorHolder.h.

109  :
110  BaseVectorHolder<T>(), helper_(p) { }
template<typename T >
edm::reftobase::IndirectVectorHolder< T >::~IndirectVectorHolder ( )
override

Definition at line 117 of file IndirectVectorHolder.h.

References edm::reftobase::IndirectVectorHolder< T >::helper_.

117  {
118  delete helper_;
119  }

Member Function Documentation

template<typename T >
IndirectVectorHolder< T >::base_ref_type const edm::reftobase::IndirectVectorHolder< T >::at ( size_type  idx) const
overridevirtual
template<typename T>
const_iterator edm::reftobase::IndirectVectorHolder< T >::begin ( void  ) const
inlineoverridevirtual

Implements edm::reftobase::BaseVectorHolder< T >.

Definition at line 93 of file IndirectVectorHolder.h.

References edm::reftobase::RefVectorHolderBase::begin(), and edm::reftobase::IndirectVectorHolder< T >::helper_.

93  {
94  return const_iterator( new const_iterator_imp_specific( helper_->begin() ) );
95  }
virtual const_iterator begin() const =0
base_type::const_iterator const_iterator
template<typename T>
static short edm::reftobase::IndirectVectorHolder< T >::Class_Version ( )
inlinestatic

Definition at line 53 of file IndirectVectorHolder.h.

55 :
56  typedef typename base_type::const_iterator_imp const_iterator_imp;
base_type::const_iterator_imp const_iterator_imp
template<typename T >
void edm::reftobase::IndirectVectorHolder< T >::clear ( void  )
overridevirtual
template<typename T >
BaseVectorHolder< T > * edm::reftobase::IndirectVectorHolder< T >::clone ( void  ) const
overridevirtual

Implements edm::reftobase::BaseVectorHolder< T >.

Definition at line 137 of file IndirectVectorHolder.h.

137  {
138  return new IndirectVectorHolder<T>(*this);
139  }
template<typename T >
BaseVectorHolder< T > * edm::reftobase::IndirectVectorHolder< T >::cloneEmpty ( ) const
overridevirtual

Implements edm::reftobase::BaseVectorHolder< T >.

Definition at line 143 of file IndirectVectorHolder.h.

References edm::reftobase::RefVectorHolderBase::cloneEmpty(), and edm::reftobase::IndirectVectorHolder< T >::helper_.

143  {
144  return new IndirectVectorHolder<T>( helper_->cloneEmpty() );
145  }
virtual RefVectorHolderBase * cloneEmpty() const =0
template<typename T >
bool edm::reftobase::IndirectVectorHolder< T >::empty ( ) const
overridevirtual
template<typename T>
const_iterator edm::reftobase::IndirectVectorHolder< T >::end ( void  ) const
inlineoverridevirtual

Implements edm::reftobase::BaseVectorHolder< T >.

Definition at line 96 of file IndirectVectorHolder.h.

References edm::reftobase::RefVectorHolderBase::end(), and edm::reftobase::IndirectVectorHolder< T >::helper_.

Referenced by Types.LuminosityBlockRange::cppID(), and Types.EventRange::cppID().

96  {
97  return const_iterator( new const_iterator_imp_specific( helper_->end() ) );
98  }
base_type::const_iterator const_iterator
virtual const_iterator end() const =0
template<typename T >
ProductID edm::reftobase::IndirectVectorHolder< T >::id ( ) const
overridevirtual
template<typename T>
bool edm::reftobase::IndirectVectorHolder< T >::isAvailable ( ) const
inlineoverridevirtual

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

Implements edm::reftobase::BaseVectorHolder< T >.

Definition at line 50 of file IndirectVectorHolder.h.

References edm::reftobase::IndirectVectorHolder< T >::helper_, and edm::reftobase::RefVectorHolderBase::isAvailable().

50 { return helper_->isAvailable(); }
virtual bool isAvailable() const =0
template<typename T >
IndirectVectorHolder< T > & edm::reftobase::IndirectVectorHolder< T >::operator= ( IndirectVectorHolder< T > const &  rhs)
inline
template<typename T >
EDProductGetter const * edm::reftobase::IndirectVectorHolder< T >::productGetter ( ) const
overridevirtual
template<typename T>
void edm::reftobase::IndirectVectorHolder< T >::push_back ( const BaseHolder< T > *  r)
inlineoverride

Definition at line 39 of file IndirectVectorHolder.h.

References h, edm::reftobase::IndirectVectorHolder< T >::helper_, edm::errors::InvalidReference, edm::reftobase::RefVectorHolderBase::push_back(), alignCSCRings::r, and edm::Exception::throwThis().

39  {
40  typedef IndirectHolder<T> holder_type;
41  const holder_type * h = dynamic_cast<const holder_type *>( r );
42  if( h == nullptr )
44  "In IndirectHolder<T> trying to push_back wrong reference type");
45  helper_->push_back( h->helper_ );
46  }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
Definition: EDMException.cc:83
virtual void push_back(RefHolderBase const *r)=0
template<typename T >
IndirectVectorHolder< T >::size_type edm::reftobase::IndirectVectorHolder< T >::size ( void  ) const
overridevirtual
template<typename T >
void edm::reftobase::IndirectVectorHolder< T >::swap ( IndirectVectorHolder< T > &  other)
inline

Definition at line 122 of file IndirectVectorHolder.h.

References edm::reftobase::IndirectVectorHolder< T >::helper_, edm::reftobase::BaseVectorHolder< T >::swap(), and std::swap().

Referenced by edm::reftobase::IndirectVectorHolder< T >::operator=().

122  {
124  std::swap(helper_, other.helper_);
125  }
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
void swap(BaseVectorHolder &)
template<typename T>
std::unique_ptr<reftobase::RefVectorHolderBase> edm::reftobase::IndirectVectorHolder< T >::vectorHolder ( ) const
inlineoverridevirtual

Implements edm::reftobase::BaseVectorHolder< T >.

Definition at line 36 of file IndirectVectorHolder.h.

References edm::reftobase::RefVectorHolderBase::clone(), and edm::reftobase::IndirectVectorHolder< T >::helper_.

36  {
37  return std::unique_ptr<reftobase::RefVectorHolderBase>( helper_->clone() );
38  }
virtual RefVectorHolderBase * clone() const =0

Member Data Documentation

template<typename T>
RefVectorHolderBase* edm::reftobase::IndirectVectorHolder< T >::helper_
private