#include <RefToBaseProd.h>
Public Types | |
typedef View< T > | product_type |
Public Member Functions | |
product_type const * | get () const |
bool | hasCache () const |
Checks if product is in memory. | |
ProductID | id () const |
Accessor for product ID. | |
bool | isNonnull () const |
Checks for non-null. | |
bool | isNull () const |
Checks for null. | |
bool | operator! () const |
Checks for null. | |
product_type const & | operator* () const |
Dereference operator. | |
product_type const * | operator-> () const |
Member dereference operator. | |
RefToBaseProd< T > & | operator= (const RefToBaseProd< T > &other) |
product_type const * | product () const |
EDProductGetter const * | productGetter () const |
Accessor for product getter. | |
template<class HandleC > | |
RefToBaseProd (HandleC const &handle) | |
General purpose constructor from handle-like object. | |
RefToBaseProd (const View< T > &) | |
RefToBaseProd (RefToBase< T > const &ref) | |
Constructor from RefToBase. | |
template<typename C , typename F > | |
RefToBaseProd (Ref< C, T, F > const &ref) | |
Constructor from Ref<C,T,F> | |
RefToBaseProd (const RefToBaseProd< T > &) | |
template<typename C > | |
RefToBaseProd (const RefProd< C > &) | |
RefToBaseProd () | |
Default constructor needed for reading from persistent store. Not for direct use. | |
RefToBaseProd (Handle< View< T > > const &handle) | |
void | swap (RefToBaseProd< T > &) |
~RefToBaseProd () | |
Destructor. | |
Private Member Functions | |
RefCore const & | refCore () const |
View< T > const * | viewPtr () const |
Private Attributes | |
RefCore | product_ |
Definition at line 22 of file RefToBaseProd.h.
typedef View<T> edm::RefToBaseProd< T >::product_type |
Definition at line 24 of file RefToBaseProd.h.
edm::RefToBaseProd< T >::RefToBaseProd | ( | ) | [inline] |
Default constructor needed for reading from persistent store. Not for direct use.
Definition at line 27 of file RefToBaseProd.h.
: product_(){}
edm::RefToBaseProd< T >::RefToBaseProd | ( | HandleC const & | handle | ) | [inline, explicit] |
General purpose constructor from handle-like object.
Definition at line 244 of file RefToBaseProd.h.
References edm::RefToBaseProd< T >::product_, edm::detail::reallyFillView(), and edm::RefCore::setProductPtr().
: product_(handle.id(), handle.product(), 0, false) { std::vector<void const*> pointers; typedef typename refhelper::RefToBaseProdTrait<typename HandleC::element_type>::ref_vector_type ref_vector; typedef reftobase::RefVectorHolder<ref_vector> holder_type; helper_vector_ptr helpers(new holder_type); detail::reallyFillView(* handle, handle.id(), pointers, * helpers); product_.setProductPtr(new View<T>(pointers, helpers)); }
edm::RefToBaseProd< T >::RefToBaseProd | ( | Handle< View< T > > const & | handle | ) | [inline, explicit] |
Definition at line 132 of file RefToBaseProd.h.
References patZpeak::handle, edm::RefToBaseProd< T >::product_, and edm::RefCore::setProductPtr().
edm::RefToBaseProd< T >::RefToBaseProd | ( | Ref< C, T, F > const & | ref | ) | [inline, explicit] |
Constructor from Ref<C,T,F>
Constructor from Ref.
Definition at line 258 of file RefToBaseProd.h.
References edm::Ref< C, T, F >::id(), edm::Ref< C, T, F >::product(), edm::RefToBaseProd< T >::product_, edm::detail::reallyFillView(), and edm::RefCore::setProductPtr().
: product_(ref.id(), ref.hasProductCache() ? ref.product() : 0, ref.productGetter(), false) { std::vector<void const*> pointers; typedef typename refhelper::RefToBaseProdTrait<C>::ref_vector_type ref_vector; typedef reftobase::RefVectorHolder<ref_vector> holder_type; helper_vector_ptr helpers(new holder_type); detail::reallyFillView(* ref.product(), ref.id(), pointers, * helpers); product_.setProductPtr(new View<T>(pointers, helpers)); }
edm::RefToBaseProd< T >::RefToBaseProd | ( | RefToBase< T > const & | ref | ) | [inline, explicit] |
Constructor from RefToBase.
Definition at line 274 of file RefToBaseProd.h.
References edm::RefToBase< T >::holder_, edm::RefToBase< T >::id(), edm::reftobase::BaseHolder< T >::makeVectorBaseHolder(), edm::RefToBase< T >::product(), edm::RefToBaseProd< T >::product_, and edm::RefCore::setProductPtr().
: product_(ref.id(), ref.hasProductCache() ? ref.product() : 0, ref.productGetter(), false) { std::vector<void const*> pointers; helper_vector_ptr helpers(ref.holder_->makeVectorBaseHolder().release()); helpers->reallyFillView(ref.product(), ref.id(), pointers); product_.setProductPtr(new View<T>(pointers, helpers)); }
edm::RefToBaseProd< T >::RefToBaseProd | ( | const View< T > & | view | ) | [inline, explicit] |
Definition at line 140 of file RefToBaseProd.h.
References edm::RefToBaseProd< T >::product_, and edm::RefCore::setProductPtr().
edm::RefToBaseProd< T >::RefToBaseProd | ( | const RefToBaseProd< T > & | ref | ) | [inline] |
Definition at line 147 of file RefToBaseProd.h.
References edm::RefToBaseProd< T >::product_, edm::RefCore::productPtr(), edm::RefCore::setProductPtr(), and edm::RefToBaseProd< T >::viewPtr().
edm::RefToBaseProd< T >::RefToBaseProd | ( | const RefProd< C > & | ref | ) | [inline] |
Definition at line 231 of file RefToBaseProd.h.
References edm::RefProd< C >::id(), edm::RefProd< C >::product(), edm::RefToBaseProd< T >::product_, edm::detail::reallyFillView(), and edm::RefCore::setProductPtr().
: product_(ref.refCore()) { std::vector<void const*> pointers; typedef typename refhelper::RefToBaseProdTrait<C>::ref_vector_type ref_vector; typedef reftobase::RefVectorHolder<ref_vector> holder_type; helper_vector_ptr helpers(new holder_type); detail::reallyFillView(* ref.product(), ref.id(), pointers, * helpers); product_.setProductPtr(new View<T>(pointers, helpers)); }
edm::RefToBaseProd< T >::~RefToBaseProd | ( | ) | [inline] |
Destructor.
Definition at line 47 of file RefToBaseProd.h.
References edm::RefToBaseProd< T >::viewPtr().
{ delete viewPtr();}
product_type const* edm::RefToBaseProd< T >::get | ( | void | ) | const [inline] |
Returns C++ pointer to the product Will attempt to retrieve product
Definition at line 57 of file RefToBaseProd.h.
References edm::RefToBaseProd< T >::isNull(), and edm::RefToBaseProd< T >::operator->().
{ return isNull() ? 0 : this->operator->(); }
bool edm::RefToBaseProd< T >::hasCache | ( | ) | const [inline] |
Checks if product is in memory.
Definition at line 83 of file RefToBaseProd.h.
References edm::RefToBaseProd< T >::product_, and edm::RefCore::productPtr().
{return product_.productPtr() != 0;}
ProductID edm::RefToBaseProd< T >::id | ( | void | ) | const [inline] |
Accessor for product ID.
Definition at line 77 of file RefToBaseProd.h.
References edm::RefCore::id(), and edm::RefToBaseProd< T >::product_.
Referenced by edm::RefToBaseProd< T >::isNonnull().
{return product_.id();}
bool edm::RefToBaseProd< T >::isNonnull | ( | ) | const [inline] |
Checks for non-null.
Definition at line 71 of file RefToBaseProd.h.
References edm::RefToBaseProd< T >::id(), and edm::ProductID::isValid().
Referenced by edm::RefToBaseProd< T >::isNull().
{return id().isValid(); }
bool edm::RefToBaseProd< T >::isNull | ( | ) | const [inline] |
Checks for null.
Definition at line 68 of file RefToBaseProd.h.
References edm::RefToBaseProd< T >::isNonnull().
Referenced by edm::RefToBaseProd< T >::get(), edm::RefToBaseProd< T >::operator!(), and edm::RefToBaseProd< T >::product().
{return !isNonnull(); }
bool edm::RefToBaseProd< T >::operator! | ( | ) | const [inline] |
Checks for null.
Definition at line 74 of file RefToBaseProd.h.
References edm::RefToBaseProd< T >::isNull().
{return isNull(); }
View< T > const & edm::RefToBaseProd< T >::operator* | ( | ) | const [inline] |
View< T > const * edm::RefToBaseProd< T >::operator-> | ( | ) | const [inline] |
Member dereference operator.
Definition at line 172 of file RefToBaseProd.h.
References edm::WrapperHolder::fillView(), edm::ProductID::id(), edm::errors::InvalidReference, edm::WrapperHolder::isValid(), and edm::Exception::throwThis().
Referenced by edm::RefToBaseProd< T >::get(), and edm::RefToBaseProd< T >::product().
{ if(product_.productPtr() == 0) { if(product_.isNull()) { Exception::throwThis(errors::InvalidReference, "attempting get view from a null RefToBaseProd.\n"); } ProductID tId = product_.id(); std::vector<void const*> pointers; helper_vector_ptr helpers; WrapperHolder it = product_.productGetter()->getIt(tId); if(!it.isValid()) { Exception::throwThis(errors::InvalidReference, "attempting to get view from an unavailable RefToBaseProd."); } it.fillView(tId, pointers, helpers); product_.setProductPtr((new View<T>(pointers, helpers))); } return viewPtr(); }
RefToBaseProd< T > & edm::RefToBaseProd< T >::operator= | ( | const RefToBaseProd< T > & | other | ) | [inline] |
Definition at line 156 of file RefToBaseProd.h.
References edm::swap(), and groupFilesInBlocks::temp.
product_type const* edm::RefToBaseProd< T >::product | ( | ) | const [inline] |
Returns C++ pointer to the product Will attempt to retrieve product
Definition at line 63 of file RefToBaseProd.h.
References edm::RefToBaseProd< T >::isNull(), and edm::RefToBaseProd< T >::operator->().
{ return isNull() ? 0 : this->operator->(); }
EDProductGetter const* edm::RefToBaseProd< T >::productGetter | ( | ) | const [inline] |
Accessor for product getter.
Definition at line 80 of file RefToBaseProd.h.
References edm::RefToBaseProd< T >::product_, and edm::RefCore::productGetter().
{return product_.productGetter();}
RefCore const& edm::RefToBaseProd< T >::refCore | ( | ) | const [inline, private] |
Definition at line 93 of file RefToBaseProd.h.
References edm::RefToBaseProd< T >::product_.
Referenced by edm::operator==().
{ return product_; }
void edm::RefToBaseProd< T >::swap | ( | RefToBaseProd< T > & | other | ) | [inline] |
Definition at line 194 of file RefToBaseProd.h.
References edm::RefToBaseProd< T >::product_, and edm::swap().
Referenced by edm::swap().
View<T> const* edm::RefToBaseProd< T >::viewPtr | ( | ) | const [inline, private] |
Definition at line 97 of file RefToBaseProd.h.
References edm::RefToBaseProd< T >::product_, and edm::RefCore::productPtr().
Referenced by edm::RefToBaseProd< T >::RefToBaseProd(), and edm::RefToBaseProd< T >::~RefToBaseProd().
{ return reinterpret_cast<const View<T>*>(product_.productPtr()); }
RefCore edm::RefToBaseProd< T >::product_ [mutable, private] |
Definition at line 102 of file RefToBaseProd.h.
Referenced by edm::RefToBaseProd< T >::hasCache(), edm::RefToBaseProd< T >::id(), edm::RefToBaseProd< T >::productGetter(), edm::RefToBaseProd< T >::refCore(), edm::RefToBaseProd< T >::RefToBaseProd(), edm::RefToBaseProd< T >::swap(), and edm::RefToBaseProd< T >::viewPtr().