CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Static Private Member Functions | Private Attributes
pat::UserHolder< T > Class Template Reference

#include <UserData.h>

Inheritance diagram for pat::UserHolder< T >:
pat::UserData

Public Member Functions

virtual UserHolder< T > * clone () const
 Clone. More...
 
virtual const std::type_info & typeId () const
 Concrete type of stored data. More...
 
virtual const std::string & typeName () const
 Human readable name of the concrete type of stored data. More...
 
 UserHolder ()
 
 UserHolder (const T &data)
 
- Public Member Functions inherited from pat::UserData
const void * bareData () const
 
template<typename T >
const Tget () const
 Extract data in a typesafe way. <T> must be the concrete type of the data. More...
 
template<typename T >
std::auto_ptr< pat::UserDatamake (const T &value, bool transientOnly)
 
 UserData ()
 
virtual ~UserData ()
 

Protected Member Functions

virtual const void * data_ () const
 Get out the data (can't template non virtual functions) More...
 

Static Private Member Functions

static const std::string & typeName_ ()
 

Private Attributes

T obj_
 

Additional Inherited Members

- Static Public Member Functions inherited from pat::UserData
template<typename T >
static std::auto_ptr< UserDatamake (const T &value, bool transientOnly=false)
 

Detailed Description

template<typename T>
class pat::UserHolder< T >

Definition at line 67 of file UserData.h.

Constructor & Destructor Documentation

template<typename T>
pat::UserHolder< T >::UserHolder ( )
inline

Definition at line 69 of file UserData.h.

69 : obj_() {}
template<typename T>
pat::UserHolder< T >::UserHolder ( const T data)
inline

Definition at line 70 of file UserData.h.

70 : obj_(data) {}
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82

Member Function Documentation

template<typename T>
virtual UserHolder<T>* pat::UserHolder< T >::clone ( void  ) const
inlinevirtual

Clone.

Implements pat::UserData.

Definition at line 72 of file UserData.h.

72 { return new UserHolder<T>(*this); }
template<typename T>
virtual const void* pat::UserHolder< T >::data_ ( ) const
inlineprotectedvirtual

Get out the data (can't template non virtual functions)

Implements pat::UserData.

Definition at line 78 of file UserData.h.

References pat::UserHolder< T >::obj_.

78 { return &obj_; }
template<typename T>
virtual const std::type_info& pat::UserHolder< T >::typeId ( ) const
inlinevirtual

Concrete type of stored data.

Implements pat::UserData.

Definition at line 74 of file UserData.h.

74 { return typeid(T); }
long double T
template<typename T>
virtual const std::string& pat::UserHolder< T >::typeName ( ) const
inlinevirtual

Human readable name of the concrete type of stored data.

Implements pat::UserData.

Definition at line 76 of file UserData.h.

References pat::UserHolder< T >::typeName_().

76 { return typeName_(); }
static const std::string & typeName_()
Definition: UserData.h:98
template<typename T >
const std::string & pat::UserHolder< T >::typeName_ ( )
staticprivate

Definition at line 98 of file UserData.h.

References mergeVDriftHistosByStation::name, and ntuplemaker::status.

Referenced by pat::UserHolder< T >::typeName().

98  {
99  static int status = 0;
100  static const char * demangled = abi::__cxa_demangle(typeid(T).name(), 0, 0, &status);
101  static const std::string name(status == 0 ? demangled : "[UNKNOWN]");
102  return name;
103 }
tuple status
Definition: ntuplemaker.py:245
long double T

Member Data Documentation

template<typename T>
T pat::UserHolder< T >::obj_
private

Definition at line 80 of file UserData.h.

Referenced by pat::UserHolder< T >::data_().