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 44 of file BasicHandle.h.

Constructor & Destructor Documentation

edm::BasicHandle::BasicHandle ( )
inline

Definition at line 46 of file BasicHandle.h.

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

Definition at line 50 of file BasicHandle.h.

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

Definition at line 55 of file BasicHandle.h.

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

Definition at line 64 of file BasicHandle.h.

64  :
65  product_(iProd),
66  prov_(iProv) {
67  }
WrapperBase const * product_
Definition: BasicHandle.h:123
Provenance const * prov_
Definition: BasicHandle.h:124
edm::BasicHandle::BasicHandle ( std::shared_ptr< HandleExceptionFactory > 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  whyFailedFactory_(iWhyFailed) {}
std::shared_ptr< HandleExceptionFactory > whyFailedFactory_
Definition: BasicHandle.h:125
WrapperBase const * product_
Definition: BasicHandle.h:123
Provenance const * prov_
Definition: BasicHandle.h:124
edm::BasicHandle::~BasicHandle ( )
inline

Definition at line 75 of file BasicHandle.h.

75 {}

Member Function Documentation

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

Definition at line 94 of file BasicHandle.h.

References whyFailedFactory_.

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

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

Definition at line 106 of file BasicHandle.h.

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

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

106  {
107  return prov_->productID();
108  }
ProductID const & productID() const
Definition: Provenance.h:78
Provenance const * prov_
Definition: BasicHandle.h:124
bool edm::BasicHandle::isValid ( void  ) const
inline
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 whyFailedFactory_.

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

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

Definition at line 110 of file BasicHandle.h.

References whyFailedFactory_.

Referenced by edm::convert_handle().

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

Definition at line 114 of file BasicHandle.h.

References whyFailedFactory_.

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

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

Definition at line 118 of file BasicHandle.h.

References whyFailedFactory_.

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

Member Data Documentation

WrapperBase const* edm::BasicHandle::product_
private

Definition at line 123 of file BasicHandle.h.

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

Provenance const* edm::BasicHandle::prov_
private

Definition at line 124 of file BasicHandle.h.

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

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

Definition at line 125 of file BasicHandle.h.

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