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 36 of file ESHandle.h.

Constructor & Destructor Documentation

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

Definition at line 41 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:80
const T * m_data
Definition: ESHandle.h:79
template<class T>
fwlite::ESHandle< T >::ESHandle ( const void *  iData)
inlineprivate

Definition at line 69 of file ESHandle.h.

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

Definition at line 72 of file ESHandle.h.

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

Member Function Documentation

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

Definition at line 44 of file ESHandle.h.

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

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

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

Definition at line 46 of file ESHandle.h.

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

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

Definition at line 53 of file ESHandle.h.

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

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

Definition at line 61 of file ESHandle.h.

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

Friends And Related Function Documentation

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

Definition at line 38 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