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 Member Functions | Private Attributes | Friends
fwlite::ESHandle< T > Class Template Reference

#include <ESHandle.h>

Public Member Functions

 ESHandle ()
 
bool isValid () const
 
const Toperator* () const
 
const Toperator-> () const
 
const std::type_info & typeInfo () const
 

Private Member Functions

 ESHandle (const void *iData)
 
 ESHandle (cms::Exception *iException)
 

Private Attributes

const Tm_data
 
std::shared_ptr< cms::Exceptionm_exception
 

Friends

class fwlite::Record
 

Detailed Description

template<class T>
class fwlite::ESHandle< T >

Definition at line 37 of file ESHandle.h.

Constructor & Destructor Documentation

template<class T>
fwlite::ESHandle< T >::ESHandle ( )
inline

Definition at line 42 of file ESHandle.h.

std::shared_ptr< cms::Exception > eshandle_not_set_exception()
Definition: ESHandle.cc:28
std::shared_ptr< cms::Exception > m_exception
Definition: ESHandle.h:81
const T * m_data
Definition: ESHandle.h:80
template<class T>
fwlite::ESHandle< T >::ESHandle ( const void *  iData)
inlineprivate

Definition at line 70 of file ESHandle.h.

70  :
71  m_data(static_cast<const T*>(iData)),
72  m_exception() {}
std::shared_ptr< cms::Exception > m_exception
Definition: ESHandle.h:81
const T * m_data
Definition: ESHandle.h:80
template<class T>
fwlite::ESHandle< T >::ESHandle ( cms::Exception iException)
inlineprivate

Definition at line 73 of file ESHandle.h.

73  :
74  m_data(0), m_exception(iException) {}
std::shared_ptr< cms::Exception > m_exception
Definition: ESHandle.h:81
const T * m_data
Definition: ESHandle.h:80

Member Function Documentation

template<class T>
bool fwlite::ESHandle< T >::isValid ( void  ) const
inline

Definition at line 45 of file ESHandle.h.

References fwlite::ESHandle< T >::m_data.

Referenced by main(), and core.AutoHandle.AutoHandle::ReallyLoad().

45 { return 0!=m_data;}
const T * m_data
Definition: ESHandle.h:80
template<class T>
const T& fwlite::ESHandle< T >::operator* ( ) const
inline

Definition at line 47 of file ESHandle.h.

References fwlite::ESHandle< T >::m_data, and fwlite::ESHandle< T >::m_exception.

47  {
48  if(0!=m_exception.get()) {
49  throw *m_exception;
50  }
51  return *m_data;
52  }
std::shared_ptr< cms::Exception > m_exception
Definition: ESHandle.h:81
const T * m_data
Definition: ESHandle.h:80
template<class T>
const T* fwlite::ESHandle< T >::operator-> ( ) const
inline

Definition at line 54 of file ESHandle.h.

References fwlite::ESHandle< T >::m_data, and fwlite::ESHandle< T >::m_exception.

54  {
55  if(0!=m_exception.get()) {
56  throw *m_exception;
57  }
58  return m_data;
59 
60  }
std::shared_ptr< cms::Exception > m_exception
Definition: ESHandle.h:81
const T * m_data
Definition: ESHandle.h:80
template<class T>
const std::type_info& fwlite::ESHandle< T >::typeInfo ( ) const
inline

Definition at line 62 of file ESHandle.h.

62  {
63  return typeid(T);
64  }
long double T

Friends And Related Function Documentation

template<class T>
friend class fwlite::Record
friend

Definition at line 39 of file ESHandle.h.

Member Data Documentation

template<class T>
const T* fwlite::ESHandle< T >::m_data
private
template<class T>
std::shared_ptr<cms::Exception> fwlite::ESHandle< T >::m_exception
private