CMS 3D CMS Logo

edm::BasicHandle Class Reference

#include <DataFormats/Common/interface/BasicHandle.h>

List of all members.

Public Member Functions

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

Private Attributes

Provenance const * prov_
boost::shared_ptr< cms::ExceptionwhyFailed_
EDProduct const * wrap_


Detailed Description

Definition at line 37 of file BasicHandle.h.


Constructor & Destructor Documentation

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

Definition at line 39 of file BasicHandle.h.

00039                   :
00040       wrap_(0),
00041       prov_(0) {}

edm::BasicHandle::BasicHandle ( BasicHandle const &  h  )  [inline]

Definition at line 43 of file BasicHandle.h.

00043                                       :
00044       wrap_(h.wrap_),
00045       prov_(h.prov_),
00046       whyFailed_(h.whyFailed_){}

edm::BasicHandle::BasicHandle ( EDProduct const *  prod,
Provenance const *  prov 
) [inline]

Definition at line 48 of file BasicHandle.h.

00048                                                                :
00049       wrap_(prod), prov_(prov) {
00050     }

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

Used when the attempt to get the data failed.

Definition at line 53 of file BasicHandle.h.

00053                                                                 :
00054     wrap_(0),
00055     prov_(0),
00056     whyFailed_(iWhyFailed) {}
    

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

Definition at line 58 of file BasicHandle.h.

00058 {}


Member Function Documentation

bool edm::BasicHandle::failedToGet (  )  const [inline]

Definition at line 78 of file BasicHandle.h.

References whyFailed_.

Referenced by edm::convert_handle(), edm::DataViewImpl::get(), edm::Event::get(), edm::DataViewImpl::getByLabel(), and edm::DataViewImpl::getByType().

00078                              {
00079       return 0 != whyFailed_.get();
00080     }

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

Definition at line 90 of file BasicHandle.h.

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

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

00090                          {
00091       if (!prov_) {
00092         return ProductID();
00093       }
00094       return prov_->productID();
00095     }

bool edm::BasicHandle::isValid ( void   )  const [inline]

Definition at line 74 of file BasicHandle.h.

References prov_, and wrap_.

00074                          {
00075       return wrap_ && prov_;
00076     }

BasicHandle& edm::BasicHandle::operator= ( BasicHandle const &  rhs  )  [inline]

Definition at line 68 of file BasicHandle.h.

References swap(), and pyDBSRunClass::temp.

00068                                                    {
00069       BasicHandle temp(rhs);
00070       this->swap(temp);
00071       return *this;
00072     }

Provenance const* edm::BasicHandle::provenance (  )  const [inline]

Definition at line 86 of file BasicHandle.h.

References prov_.

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

00086                                          {
00087       return prov_;
00088     }

void edm::BasicHandle::swap ( BasicHandle other  )  [inline]

Definition at line 60 of file BasicHandle.h.

References prov_, std::swap(), whyFailed_, and wrap_.

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

00060                                   {
00061       using std::swap;
00062       std::swap(wrap_, other.wrap_);
00063       std::swap(prov_, other.prov_);
00064       swap(whyFailed_,other.whyFailed_);
00065     }

boost::shared_ptr<cms::Exception> edm::BasicHandle::whyFailed (  )  const [inline]

Definition at line 97 of file BasicHandle.h.

References whyFailed_.

Referenced by edm::convert_handle().

00097                                                     {
00098       return whyFailed_;
00099     }

EDProduct const* edm::BasicHandle::wrapper (  )  const [inline]

Definition at line 82 of file BasicHandle.h.

References wrap_.

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

00082                                      {
00083       return wrap_;
00084     }


Member Data Documentation

Provenance const* edm::BasicHandle::prov_ [private]

Definition at line 102 of file BasicHandle.h.

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

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

Definition at line 103 of file BasicHandle.h.

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

EDProduct const* edm::BasicHandle::wrap_ [private]

Definition at line 101 of file BasicHandle.h.

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


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:39:39 2009 for CMSSW by  doxygen 1.5.4