CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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::Exception const > 
m_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 41 of file ESHandle.h.

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

Definition at line 66 of file ESHandle.h.

66 : m_data(static_cast<const T*>(iData)), m_exception() {}
std::shared_ptr< cms::Exception const > m_exception
Definition: ESHandle.h:74
const T * m_data
Definition: ESHandle.h:73
template<class T>
fwlite::ESHandle< T >::ESHandle ( cms::Exception iException)
inlineprivate

Definition at line 67 of file ESHandle.h.

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

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 ntupleDataFormat._Object::_checkIsValid(), main(), and core.AutoHandle.AutoHandle::ReallyLoad().

44 { return nullptr != m_data; }
const T * m_data
Definition: ESHandle.h:73
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 (nullptr != m_exception.get()) {
48  throw *m_exception;
49  }
50  return *m_data;
51  }
std::shared_ptr< cms::Exception const > m_exception
Definition: ESHandle.h:74
const T * m_data
Definition: ESHandle.h:73
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 (nullptr != m_exception.get()) {
55  throw *m_exception;
56  }
57  return m_data;
58  }
std::shared_ptr< cms::Exception const > m_exception
Definition: ESHandle.h:74
const T * m_data
Definition: ESHandle.h:73
template<class T>
const std::type_info& fwlite::ESHandle< T >::typeInfo ( ) const
inline

Definition at line 60 of file ESHandle.h.

60 { return typeid(T); }
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 const> fwlite::ESHandle< T >::m_exception
private