CMS 3D CMS Logo

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 (BasicHandle &&h)=default
 
 BasicHandle (WrapperBase const *iProd, Provenance const *iProv)
 
 BasicHandle (std::shared_ptr< HandleExceptionFactory > const &iWhyFailed)
 Used when the attempt to get the data failed. More...
 
void clear ()
 
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< HandleExceptionFactorywhyFailedFactory_
 

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_(nullptr) {}
WrapperBase const * product_
Definition: BasicHandle.h:121
Provenance const * prov_
Definition: BasicHandle.h:122
edm::BasicHandle::BasicHandle ( BasicHandle const &  h)
inline

Definition at line 49 of file BasicHandle.h.

References h.

49  :
50  product_(h.product_),
51  prov_(h.prov_),
52  whyFailedFactory_(h.whyFailedFactory_){}
std::shared_ptr< HandleExceptionFactory > whyFailedFactory_
Definition: BasicHandle.h:123
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
WrapperBase const * product_
Definition: BasicHandle.h:121
Provenance const * prov_
Definition: BasicHandle.h:122
edm::BasicHandle::BasicHandle ( BasicHandle &&  h)
default
edm::BasicHandle::BasicHandle ( WrapperBase const *  iProd,
Provenance const *  iProv 
)
inline

Definition at line 56 of file BasicHandle.h.

56  :
57  product_(iProd),
58  prov_(iProv) {
59  }
WrapperBase const * product_
Definition: BasicHandle.h:121
Provenance const * prov_
Definition: BasicHandle.h:122
edm::BasicHandle::BasicHandle ( std::shared_ptr< HandleExceptionFactory > const &  iWhyFailed)
inline

Used when the attempt to get the data failed.

Definition at line 62 of file BasicHandle.h.

62  :
63  product_(),
64  prov_(nullptr),
65  whyFailedFactory_(iWhyFailed) {}
std::shared_ptr< HandleExceptionFactory > whyFailedFactory_
Definition: BasicHandle.h:123
WrapperBase const * product_
Definition: BasicHandle.h:121
Provenance const * prov_
Definition: BasicHandle.h:122
edm::BasicHandle::~BasicHandle ( )
inline

Definition at line 67 of file BasicHandle.h.

67 {}

Member Function Documentation

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

Definition at line 98 of file BasicHandle.h.

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

98  {
99  return prov_->productID();
100  }
ProductID const & productID() const
Definition: Provenance.h:80
Provenance const * prov_
Definition: BasicHandle.h:122
bool edm::BasicHandle::isValid ( void  ) const
inline
BasicHandle& edm::BasicHandle::operator= ( BasicHandle const &  rhs)
inline

Definition at line 76 of file BasicHandle.h.

References edm::swap(), and groupFilesInBlocks::temp.

76  {
77  BasicHandle temp(rhs);
78  this->swap(temp);
79  return *this;
80  }
void swap(BasicHandle &other)
Definition: BasicHandle.h:69
Provenance const* edm::BasicHandle::provenance ( ) const
inline
void edm::BasicHandle::swap ( BasicHandle other)
inline

Definition at line 69 of file BasicHandle.h.

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

Referenced by edm::swap().

69  {
70  using std::swap;
71  swap(product_, other.product_);
72  std::swap(prov_, other.prov_);
73  swap(whyFailedFactory_,other.whyFailedFactory_);
74  }
std::shared_ptr< HandleExceptionFactory > whyFailedFactory_
Definition: BasicHandle.h:123
WrapperBase const * product_
Definition: BasicHandle.h:121
void swap(BasicHandle &other)
Definition: BasicHandle.h:69
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
Provenance const * prov_
Definition: BasicHandle.h:122
std::shared_ptr<cms::Exception> edm::BasicHandle::whyFailed ( ) const
inline

Definition at line 102 of file BasicHandle.h.

Referenced by edm::convert_handle().

102  {
103  return whyFailedFactory_->make();
104  }
std::shared_ptr< HandleExceptionFactory > whyFailedFactory_
Definition: BasicHandle.h:123
std::shared_ptr<HandleExceptionFactory> const& edm::BasicHandle::whyFailedFactory ( ) const
inline

Definition at line 106 of file BasicHandle.h.

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

106  {
107  return whyFailedFactory_;
108  }
std::shared_ptr< HandleExceptionFactory > whyFailedFactory_
Definition: BasicHandle.h:123
std::shared_ptr<HandleExceptionFactory>& edm::BasicHandle::whyFailedFactory ( )
inline

Definition at line 110 of file BasicHandle.h.

110  {
111  return whyFailedFactory_;
112  }
std::shared_ptr< HandleExceptionFactory > whyFailedFactory_
Definition: BasicHandle.h:123
WrapperBase const* edm::BasicHandle::wrapper ( ) const
inline

Member Data Documentation

WrapperBase const* edm::BasicHandle::product_
private

Definition at line 121 of file BasicHandle.h.

Referenced by swap().

Provenance const* edm::BasicHandle::prov_
private

Definition at line 122 of file BasicHandle.h.

Referenced by swap().

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

Definition at line 123 of file BasicHandle.h.

Referenced by swap().