test
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 override
 Clone. More...
 
virtual const std::type_info & typeId () const override
 Concrete type of stored data. More...
 
virtual const std::string & typeName () const override
 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 override
 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)
 
- Static Protected Member Functions inherited from pat::UserData
static std::string typeNameFor (std::type_info const &iInfo)
 

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.

Member Function Documentation

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

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
inlineoverrideprotectedvirtual

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

Implements pat::UserData.

Definition at line 78 of file UserData.h.

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

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
inlineoverridevirtual

Human readable name of the concrete type of stored data.

Implements pat::UserData.

Definition at line 76 of file UserData.h.

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 AlCaHLTBitMon_QueryRunRegistry::string.

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

98  {
99  static const std::string name(typeNameFor(typeid(T)));
100  return name;
101 }
static std::string typeNameFor(std::type_info const &iInfo)
Definition: UserData.cc:28
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< AlgebraicSymMatrix33 >::data_().