CMS 3D CMS Logo

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

List of all members.

Public Member Functions

virtual UserHolder< T > * clone () const
 Clone.
virtual const std::type_info & typeId () const
 Concrete type of stored data.
virtual const std::string & typeName () const
 Human readable name of the concrete type of stored data.
 UserHolder ()
 UserHolder (const T &data)

Protected Member Functions

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

Static Private Member Functions

static const std::string & typeName_ ()

Private Attributes

obj_

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.

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

Definition at line 70 of file UserData.h.

: obj_(data) {}

Member Function Documentation

template<typename T>
virtual UserHolder<T>* pat::UserHolder< T >::clone ( void  ) const [inline, virtual]

Clone.

Implements pat::UserData.

Definition at line 72 of file UserData.h.

{ return new UserHolder<T>(*this); }
template<typename T>
virtual const void* pat::UserHolder< T >::data_ ( ) const [inline, protected, virtual]

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_.

{ return &obj_; }
template<typename T>
virtual const std::type_info& pat::UserHolder< T >::typeId ( ) const [inline, virtual]

Concrete type of stored data.

Implements pat::UserData.

Definition at line 74 of file UserData.h.

{ return typeid(T); }
template<typename T>
virtual const std::string& pat::UserHolder< T >::typeName ( ) const [inline, virtual]

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_().

{ return typeName_(); }
template<typename T >
const std::string & pat::UserHolder< T >::typeName_ ( ) [static, private]

Definition at line 98 of file UserData.h.

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

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

                                              {
    static int status = 0;
    static const char * demangled = abi::__cxa_demangle(typeid(T).name(),  0, 0, &status);
    static const std::string name(status == 0 ? demangled : "[UNKNOWN]");
    return name;
}

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_().