CMS 3D CMS Logo

Public Member Functions | Private Attributes

edm::BasicHandle Class Reference

#include <BasicHandle.h>

List of all members.

Public Member Functions

 BasicHandle ()
 BasicHandle (BasicHandle const &h)
 BasicHandle (WrapperHolder const &iWrapperHolder, Provenance const *iProv)
 BasicHandle (ProductData const &productData)
 BasicHandle (void const *iProd, WrapperInterfaceBase const *iInterface, Provenance const *iProv)
 BasicHandle (boost::shared_ptr< cms::Exception > const &iWhyFailed)
 Used when the attempt to get the data failed.
bool failedToGet () const
ProductID id () const
WrapperInterfaceBase const * interface () const
bool isValid () const
BasicHandleoperator= (BasicHandle const &rhs)
Provenance const * provenance () const
void swap (BasicHandle &other)
boost::shared_ptr< cms::ExceptionwhyFailed () const
void const * wrapper () const
WrapperHolder wrapperHolder () const
 ~BasicHandle ()

Private Attributes

WrapperHolder product_
Provenance const * prov_
boost::shared_ptr< cms::ExceptionwhyFailed_

Detailed Description

Definition at line 43 of file BasicHandle.h.


Constructor & Destructor Documentation

edm::BasicHandle::BasicHandle ( ) [inline]

Definition at line 45 of file BasicHandle.h.

                  :
      product_(),
      prov_(0) {}
edm::BasicHandle::BasicHandle ( BasicHandle const &  h) [inline]

Definition at line 49 of file BasicHandle.h.

                                      :
      product_(h.product_),
      prov_(h.prov_),
      whyFailed_(h.whyFailed_){}
edm::BasicHandle::BasicHandle ( void const *  iProd,
WrapperInterfaceBase const *  iInterface,
Provenance const *  iProv 
) [inline]

Definition at line 54 of file BasicHandle.h.

                                                                                                    :
      product_(WrapperHolder(iProd, iInterface)),
      prov_(iProv) {
    }
edm::BasicHandle::BasicHandle ( WrapperHolder const &  iWrapperHolder,
Provenance const *  iProv 
) [inline]

Definition at line 59 of file BasicHandle.h.

                                                                              :
      product_(iWrapperHolder),
      prov_(iProv) {
    }
edm::BasicHandle::BasicHandle ( ProductData const &  productData) [inline]

Definition at line 64 of file BasicHandle.h.

                                                :
      product_(WrapperHolder(productData.wrapper_.get(), productData.getInterface())),
      prov_(&productData.prov_) {
    }
edm::BasicHandle::BasicHandle ( boost::shared_ptr< cms::Exception > const &  iWhyFailed) [inline]

Used when the attempt to get the data failed.

Definition at line 70 of file BasicHandle.h.

                                                                :
    product_(),
    prov_(0),
    whyFailed_(iWhyFailed) {}
edm::BasicHandle::~BasicHandle ( ) [inline]

Definition at line 75 of file BasicHandle.h.

{}

Member Function Documentation

bool edm::BasicHandle::failedToGet ( ) const [inline]
ProductID edm::BasicHandle::id ( void  ) const [inline]

Definition at line 114 of file BasicHandle.h.

References edm::Provenance::productID(), and prov_.

Referenced by edm::convert_handle(), and edm::Event::fillView_().

                         {
      return prov_->productID();
    }
WrapperInterfaceBase const* edm::BasicHandle::interface ( ) const [inline]

Definition at line 98 of file BasicHandle.h.

References edm::WrapperHolder::interface(), and product_.

Referenced by edm::convert_handle(), and edm::Event::fillView_().

                                                  {
      return product_.interface();
    }
bool edm::BasicHandle::isValid ( void  ) const [inline]
BasicHandle& edm::BasicHandle::operator= ( BasicHandle const &  rhs) [inline]

Definition at line 84 of file BasicHandle.h.

References swap(), and cond::rpcobtemp::temp.

                                                   {
      BasicHandle temp(rhs);
      this->swap(temp);
      return *this;
    }
Provenance const* edm::BasicHandle::provenance ( ) const [inline]
void edm::BasicHandle::swap ( BasicHandle other) [inline]

Definition at line 77 of file BasicHandle.h.

References product_, prov_, and whyFailed_.

Referenced by operator=(), and edm::swap().

                                  {
      using std::swap;
      swap(product_, other.product_);
      std::swap(prov_, other.prov_);
      swap(whyFailed_,other.whyFailed_);
    }
boost::shared_ptr<cms::Exception> edm::BasicHandle::whyFailed ( ) const [inline]

Definition at line 118 of file BasicHandle.h.

References whyFailed_.

Referenced by edm::convert_handle().

                                                    {
      return whyFailed_;
    }
void const* edm::BasicHandle::wrapper ( ) const [inline]

Definition at line 102 of file BasicHandle.h.

References product_, and edm::WrapperHolder::wrapper().

Referenced by edm::convert_handle(), and edm::Event::fillView_().

                                {
      return product_.wrapper();
    }
WrapperHolder edm::BasicHandle::wrapperHolder ( ) const [inline]

Definition at line 106 of file BasicHandle.h.

References product_.

Referenced by edm::convert_handle(), and edm::EventPrincipal::getIt().

                                        {
      return product_;
    }

Member Data Documentation

Definition at line 122 of file BasicHandle.h.

Referenced by interface(), isValid(), swap(), wrapper(), and wrapperHolder().

Definition at line 123 of file BasicHandle.h.

Referenced by id(), isValid(), provenance(), and swap().

boost::shared_ptr<cms::Exception> edm::BasicHandle::whyFailed_ [private]

Definition at line 124 of file BasicHandle.h.

Referenced by failedToGet(), swap(), and whyFailed().