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 (boost::shared_ptr< cms::Exception > const &iWhyFailed)
 Used when the attempt to get the data failed.
 BasicHandle (boost::shared_ptr< EDProduct const > prod, Provenance const *prov)
bool failedToGet () const
ProductID id () const
bool isValid () const
BasicHandleoperator= (BasicHandle const &rhs)
boost::shared_ptr< EDProduct
const > 
product () const
Provenance const * provenance () const
void swap (BasicHandle &other)
boost::shared_ptr< cms::ExceptionwhyFailed () const
EDProduct const * wrapper () const
 ~BasicHandle ()

Private Attributes

boost::shared_ptr< EDProduct
const > 
product_
Provenance const * prov_
boost::shared_ptr< cms::ExceptionwhyFailed_

Detailed Description

Definition at line 41 of file BasicHandle.h.


Constructor & Destructor Documentation

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

Definition at line 43 of file BasicHandle.h.

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

Definition at line 47 of file BasicHandle.h.

                                      :
      product_(h.product_),
      prov_(h.prov_),
      whyFailed_(h.whyFailed_){}
edm::BasicHandle::BasicHandle ( boost::shared_ptr< EDProduct const >  prod,
Provenance const *  prov 
) [inline]

Definition at line 52 of file BasicHandle.h.

                                                                               :
      product_(prod), prov_(prov) {

    }
edm::BasicHandle::BasicHandle ( boost::shared_ptr< cms::Exception > const &  iWhyFailed) [inline]

Used when the attempt to get the data failed.

Definition at line 58 of file BasicHandle.h.

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

Definition at line 63 of file BasicHandle.h.

{}

Member Function Documentation

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

Definition at line 99 of file BasicHandle.h.

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

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

                         {
      return prov_->productID();
    }
bool edm::BasicHandle::isValid ( void  ) const [inline]
BasicHandle& edm::BasicHandle::operator= ( BasicHandle const &  rhs) [inline]

Definition at line 73 of file BasicHandle.h.

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

                                                   {
      BasicHandle temp(rhs);
      this->swap(temp);
      return *this;
    }
boost::shared_ptr<EDProduct const> edm::BasicHandle::product ( ) const [inline]

Definition at line 91 of file BasicHandle.h.

References product_.

                                                     {
      return product_;
    }
Provenance const* edm::BasicHandle::provenance ( ) const [inline]
void edm::BasicHandle::swap ( BasicHandle other) [inline]

Definition at line 65 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 103 of file BasicHandle.h.

References whyFailed_.

Referenced by edm::convert_handle().

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

Definition at line 87 of file BasicHandle.h.

References product_.

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

                                     {
      return product_.get();
    }

Member Data Documentation

boost::shared_ptr<EDProduct const> edm::BasicHandle::product_ [private]

Definition at line 107 of file BasicHandle.h.

Referenced by isValid(), product(), swap(), and wrapper().

Definition at line 108 of file BasicHandle.h.

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

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

Definition at line 109 of file BasicHandle.h.

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