CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
edm::BasicHandle Class Reference

#include <BasicHandle.h>

Public Member Functions

 BasicHandle ()
 
 BasicHandle (BasicHandle const &h)
 
 BasicHandle (boost::shared_ptr< EDProduct const > prod, Provenance const *prov)
 
 BasicHandle (boost::shared_ptr< cms::Exception > const &iWhyFailed)
 Used when the attempt to get the data failed. More...
 
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.

43  :
44  product_(),
45  prov_(0) {}
boost::shared_ptr< EDProduct const > product_
Definition: BasicHandle.h:107
Provenance const * prov_
Definition: BasicHandle.h:108
edm::BasicHandle::BasicHandle ( BasicHandle const &  h)
inline

Definition at line 47 of file BasicHandle.h.

47  :
48  product_(h.product_),
49  prov_(h.prov_),
50  whyFailed_(h.whyFailed_){}
boost::shared_ptr< cms::Exception > whyFailed_
Definition: BasicHandle.h:109
boost::shared_ptr< EDProduct const > product_
Definition: BasicHandle.h:107
Provenance const * prov_
Definition: BasicHandle.h:108
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
edm::BasicHandle::BasicHandle ( boost::shared_ptr< EDProduct const >  prod,
Provenance const *  prov 
)
inline

Definition at line 52 of file BasicHandle.h.

52  :
53  product_(prod), prov_(prov) {
54 
55  }
tuple prod
Definition: CrabTask.py:87
boost::shared_ptr< EDProduct const > product_
Definition: BasicHandle.h:107
Provenance const * prov_
Definition: BasicHandle.h:108
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.

58  :
59  product_(),
60  prov_(0),
61  whyFailed_(iWhyFailed) {}
boost::shared_ptr< cms::Exception > whyFailed_
Definition: BasicHandle.h:109
boost::shared_ptr< EDProduct const > product_
Definition: BasicHandle.h:107
Provenance const * prov_
Definition: BasicHandle.h:108
edm::BasicHandle::~BasicHandle ( )
inline

Definition at line 63 of file BasicHandle.h.

63 {}

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_().

99  {
100  return prov_->productID();
101  }
ProductID const & productID() const
Definition: Provenance.h:88
Provenance const * prov_
Definition: BasicHandle.h:108
bool edm::BasicHandle::isValid ( void  ) const
inline

Definition at line 79 of file BasicHandle.h.

References product_, and prov_.

Referenced by edm::Principal::findGroup(), edm::Principal::findGroupByLabel(), edm::LuminosityBlock::getByLabelImpl(), edm::Run::getByLabelImpl(), and edm::Event::getByLabelImpl().

79  {
80  return product_ && prov_;
81  }
boost::shared_ptr< EDProduct const > product_
Definition: BasicHandle.h:107
Provenance const * prov_
Definition: BasicHandle.h:108
BasicHandle& edm::BasicHandle::operator= ( BasicHandle const &  rhs)
inline

Definition at line 73 of file BasicHandle.h.

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

73  {
74  BasicHandle temp(rhs);
75  this->swap(temp);
76  return *this;
77  }
void swap(BasicHandle &other)
Definition: BasicHandle.h:65
boost::shared_ptr<EDProduct const> edm::BasicHandle::product ( ) const
inline

Definition at line 91 of file BasicHandle.h.

References product_.

91  {
92  return product_;
93  }
boost::shared_ptr< EDProduct const > product_
Definition: BasicHandle.h:107
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_, std::swap(), and whyFailed_.

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

65  {
66  using std::swap;
67  swap(product_, other.product_);
68  std::swap(prov_, other.prov_);
69  swap(whyFailed_,other.whyFailed_);
70  }
void swap(BasicHandle &other)
Definition: BasicHandle.h:65
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
boost::shared_ptr< cms::Exception > whyFailed_
Definition: BasicHandle.h:109
boost::shared_ptr< EDProduct const > product_
Definition: BasicHandle.h:107
Provenance const * prov_
Definition: BasicHandle.h:108
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().

103  {
104  return whyFailed_;
105  }
boost::shared_ptr< cms::Exception > whyFailed_
Definition: BasicHandle.h:109
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().

87  {
88  return product_.get();
89  }
boost::shared_ptr< EDProduct const > product_
Definition: BasicHandle.h:107

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().

Provenance const* edm::BasicHandle::prov_
private

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().