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 (ProductData const &productData)
 
 BasicHandle (WrapperBase const *iProd, Provenance const *iProv)
 
 BasicHandle (std::shared_ptr< HandleExceptionFactory > 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)
 
Provenance const * provenance () const
 
void swap (BasicHandle &other)
 
std::shared_ptr< cms::ExceptionwhyFailed () const
 
std::shared_ptr
< HandleExceptionFactory >
const & 
whyFailedFactory () const
 
std::shared_ptr
< HandleExceptionFactory > & 
whyFailedFactory ()
 
WrapperBase const * wrapper () const
 
 ~BasicHandle ()
 

Private Attributes

WrapperBase const * product_
 
Provenance const * prov_
 
std::shared_ptr
< HandleExceptionFactory
whyFailedFactory_
 

Detailed Description

Definition at line 45 of file BasicHandle.h.

Constructor & Destructor Documentation

edm::BasicHandle::BasicHandle ( )
inline

Definition at line 47 of file BasicHandle.h.

47  :
48  product_(),
49  prov_(0) {}
WrapperBase const * product_
Definition: BasicHandle.h:124
Provenance const * prov_
Definition: BasicHandle.h:125
edm::BasicHandle::BasicHandle ( BasicHandle const &  h)
inline

Definition at line 51 of file BasicHandle.h.

51  :
52  product_(h.product_),
53  prov_(h.prov_),
54  whyFailedFactory_(h.whyFailedFactory_){}
std::shared_ptr< HandleExceptionFactory > whyFailedFactory_
Definition: BasicHandle.h:126
WrapperBase const * product_
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:125
edm::BasicHandle::BasicHandle ( ProductData const &  productData)
inlineexplicit

Definition at line 56 of file BasicHandle.h.

56  :
57  product_(productData.wrapper_.get()),
58  prov_(&productData.prov_) {
59  }
WrapperBase const * product_
Definition: BasicHandle.h:124
Provenance const * prov_
Definition: BasicHandle.h:125
edm::BasicHandle::BasicHandle ( WrapperBase const *  iProd,
Provenance const *  iProv 
)
inline

Definition at line 65 of file BasicHandle.h.

65  :
66  product_(iProd),
67  prov_(iProv) {
68  }
WrapperBase const * product_
Definition: BasicHandle.h:124
Provenance const * prov_
Definition: BasicHandle.h:125
edm::BasicHandle::BasicHandle ( std::shared_ptr< HandleExceptionFactory > const &  iWhyFailed)
inline

Used when the attempt to get the data failed.

Definition at line 71 of file BasicHandle.h.

71  :
72  product_(),
73  prov_(0),
74  whyFailedFactory_(iWhyFailed) {}
std::shared_ptr< HandleExceptionFactory > whyFailedFactory_
Definition: BasicHandle.h:126
WrapperBase const * product_
Definition: BasicHandle.h:124
Provenance const * prov_
Definition: BasicHandle.h:125
edm::BasicHandle::~BasicHandle ( )
inline

Definition at line 76 of file BasicHandle.h.

76 {}

Member Function Documentation

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

Definition at line 95 of file BasicHandle.h.

References whyFailedFactory_.

Referenced by edm::convert_handle(), edm::Event::get(), edm::EventBase::getByLabel(), edm::Event::getByLabel(), and edm::Event::getByToken().

95  {
96  return bool(whyFailedFactory_);
97  }
std::shared_ptr< HandleExceptionFactory > whyFailedFactory_
Definition: BasicHandle.h:126
ProductID edm::BasicHandle::id ( void  ) const
inline

Definition at line 107 of file BasicHandle.h.

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

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

107  {
108  return prov_->productID();
109  }
ProductID const & productID() const
Definition: Provenance.h:79
Provenance const * prov_
Definition: BasicHandle.h:125
bool edm::BasicHandle::isValid ( void  ) const
inline
BasicHandle& edm::BasicHandle::operator= ( BasicHandle const &  rhs)
inline

Definition at line 85 of file BasicHandle.h.

References swap(), and groupFilesInBlocks::temp.

85  {
86  BasicHandle temp(rhs);
87  this->swap(temp);
88  return *this;
89  }
void swap(BasicHandle &other)
Definition: BasicHandle.h:78
Provenance const* edm::BasicHandle::provenance ( ) const
inline
void edm::BasicHandle::swap ( BasicHandle other)
inline

Definition at line 78 of file BasicHandle.h.

References product_, prov_, std::swap(), and whyFailedFactory_.

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

78  {
79  using std::swap;
80  swap(product_, other.product_);
81  std::swap(prov_, other.prov_);
82  swap(whyFailedFactory_,other.whyFailedFactory_);
83  }
std::shared_ptr< HandleExceptionFactory > whyFailedFactory_
Definition: BasicHandle.h:126
WrapperBase const * product_
Definition: BasicHandle.h:124
void swap(BasicHandle &other)
Definition: BasicHandle.h:78
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
Provenance const * prov_
Definition: BasicHandle.h:125
std::shared_ptr<cms::Exception> edm::BasicHandle::whyFailed ( ) const
inline

Definition at line 111 of file BasicHandle.h.

References whyFailedFactory_.

Referenced by edm::convert_handle().

111  {
112  return whyFailedFactory_->make();
113  }
std::shared_ptr< HandleExceptionFactory > whyFailedFactory_
Definition: BasicHandle.h:126
std::shared_ptr<HandleExceptionFactory> const& edm::BasicHandle::whyFailedFactory ( ) const
inline

Definition at line 115 of file BasicHandle.h.

References whyFailedFactory_.

Referenced by edm::Event::getByLabel(), and edm::Event::getByToken().

115  {
116  return whyFailedFactory_;
117  }
std::shared_ptr< HandleExceptionFactory > whyFailedFactory_
Definition: BasicHandle.h:126
std::shared_ptr<HandleExceptionFactory>& edm::BasicHandle::whyFailedFactory ( )
inline

Definition at line 119 of file BasicHandle.h.

References whyFailedFactory_.

119  {
120  return whyFailedFactory_;
121  }
std::shared_ptr< HandleExceptionFactory > whyFailedFactory_
Definition: BasicHandle.h:126
WrapperBase const* edm::BasicHandle::wrapper ( ) const
inline

Member Data Documentation

WrapperBase const* edm::BasicHandle::product_
private

Definition at line 124 of file BasicHandle.h.

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

Provenance const* edm::BasicHandle::prov_
private

Definition at line 125 of file BasicHandle.h.

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

std::shared_ptr<HandleExceptionFactory> edm::BasicHandle::whyFailedFactory_
private

Definition at line 126 of file BasicHandle.h.

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