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 (void const *iProd, WrapperInterfaceBase const *iInterface, Provenance const *iProv)
 
 BasicHandle (WrapperHolder const &iWrapperHolder, Provenance const *iProv)
 
 BasicHandle (ProductData const &productData)
 
 BasicHandle (boost::shared_ptr< cms::Exception > const &iWhyFailed)
 Used when the attempt to get the data failed. More...
 
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.

45  :
46  product_(),
47  prov_(0) {}
WrapperHolder product_
Definition: BasicHandle.h:122
Provenance const * prov_
Definition: BasicHandle.h:123
edm::BasicHandle::BasicHandle ( BasicHandle const &  h)
inline

Definition at line 49 of file BasicHandle.h.

49  :
50  product_(h.product_),
51  prov_(h.prov_),
52  whyFailed_(h.whyFailed_){}
WrapperHolder product_
Definition: BasicHandle.h:122
boost::shared_ptr< cms::Exception > whyFailed_
Definition: BasicHandle.h:124
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
Provenance const * prov_
Definition: BasicHandle.h:123
edm::BasicHandle::BasicHandle ( void const *  iProd,
WrapperInterfaceBase const *  iInterface,
Provenance const *  iProv 
)
inline

Definition at line 54 of file BasicHandle.h.

54  :
55  product_(WrapperHolder(iProd, iInterface)),
56  prov_(iProv) {
57  }
WrapperHolder product_
Definition: BasicHandle.h:122
Provenance const * prov_
Definition: BasicHandle.h:123
edm::BasicHandle::BasicHandle ( WrapperHolder const &  iWrapperHolder,
Provenance const *  iProv 
)
inline

Definition at line 59 of file BasicHandle.h.

59  :
60  product_(iWrapperHolder),
61  prov_(iProv) {
62  }
WrapperHolder product_
Definition: BasicHandle.h:122
Provenance const * prov_
Definition: BasicHandle.h:123
edm::BasicHandle::BasicHandle ( ProductData const &  productData)
inline

Definition at line 64 of file BasicHandle.h.

64  :
65  product_(WrapperHolder(productData.wrapper_.get(), productData.getInterface())),
66  prov_(&productData.prov_) {
67  }
WrapperHolder product_
Definition: BasicHandle.h:122
Provenance const * prov_
Definition: BasicHandle.h:123
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.

70  :
71  product_(),
72  prov_(0),
73  whyFailed_(iWhyFailed) {}
WrapperHolder product_
Definition: BasicHandle.h:122
boost::shared_ptr< cms::Exception > whyFailed_
Definition: BasicHandle.h:124
Provenance const * prov_
Definition: BasicHandle.h:123
edm::BasicHandle::~BasicHandle ( )
inline

Definition at line 75 of file BasicHandle.h.

75 {}

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

114  {
115  return prov_->productID();
116  }
ProductID const & productID() const
Definition: Provenance.h:88
Provenance const * prov_
Definition: BasicHandle.h:123
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_().

98  {
99  return product_.interface();
100  }
WrapperHolder product_
Definition: BasicHandle.h:122
WrapperInterfaceBase const * interface() const
Definition: WrapperHolder.h:80
bool edm::BasicHandle::isValid ( void  ) const
inline

Definition at line 90 of file BasicHandle.h.

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

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

90  {
91  return product_.wrapper() != 0 && prov_ != 0;
92  }
WrapperHolder product_
Definition: BasicHandle.h:122
void const * wrapper() const
Definition: WrapperHolder.h:76
Provenance const * prov_
Definition: BasicHandle.h:123
BasicHandle& edm::BasicHandle::operator= ( BasicHandle const &  rhs)
inline

Definition at line 84 of file BasicHandle.h.

References swap(), and groupFilesInBlocks::temp.

84  {
85  BasicHandle temp(rhs);
86  this->swap(temp);
87  return *this;
88  }
void swap(BasicHandle &other)
Definition: BasicHandle.h:77
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_, std::swap(), and whyFailed_.

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

77  {
78  using std::swap;
79  swap(product_, other.product_);
80  std::swap(prov_, other.prov_);
81  swap(whyFailed_,other.whyFailed_);
82  }
WrapperHolder product_
Definition: BasicHandle.h:122
void swap(BasicHandle &other)
Definition: BasicHandle.h:77
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
boost::shared_ptr< cms::Exception > whyFailed_
Definition: BasicHandle.h:124
Provenance const * prov_
Definition: BasicHandle.h:123
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().

118  {
119  return whyFailed_;
120  }
boost::shared_ptr< cms::Exception > whyFailed_
Definition: BasicHandle.h:124
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_().

102  {
103  return product_.wrapper();
104  }
WrapperHolder product_
Definition: BasicHandle.h:122
void const * wrapper() const
Definition: WrapperHolder.h:76
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().

106  {
107  return product_;
108  }
WrapperHolder product_
Definition: BasicHandle.h:122

Member Data Documentation

WrapperHolder edm::BasicHandle::product_
private

Definition at line 122 of file BasicHandle.h.

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

Provenance const* edm::BasicHandle::prov_
private

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