CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes
cond::service::GetTokenFromPointer< T > Struct Template Reference

#include <PoolDBOutputService.h>

Inheritance diagram for cond::service::GetTokenFromPointer< T >:
cond::service::GetToken

Public Member Functions

 GetTokenFromPointer (T *p)
 
virtual std::string operator() (cond::DbSession &pooldb) const
 

Static Public Member Functions

static std::string classNameForPointer (T *pointer)
 

Public Attributes

Tm_p
 

Detailed Description

template<typename T>
struct cond::service::GetTokenFromPointer< T >

Definition at line 68 of file PoolDBOutputService.h.

Constructor & Destructor Documentation

template<typename T >
cond::service::GetTokenFromPointer< T >::GetTokenFromPointer ( T p)
inlineexplicit

Member Function Documentation

template<typename T >
static std::string cond::service::GetTokenFromPointer< T >::classNameForPointer ( T pointer)
inlinestatic

Definition at line 71 of file PoolDBOutputService.h.

References cond::classNameForTypeId().

Referenced by cond::service::GetTokenFromPointer< T >::operator()().

71  {
72  if(!pointer) return classNameForTypeId( typeid(T) );
73  return classNameForTypeId( typeid(*pointer) );
74  }
std::string classNameForTypeId(const std::type_info &typeInfo)
long double T
template<typename T >
virtual std::string cond::service::GetTokenFromPointer< T >::operator() ( cond::DbSession pooldb) const
inlinevirtual

Implements cond::service::GetToken.

Definition at line 79 of file PoolDBOutputService.h.

References cond::className(), cond::service::GetTokenFromPointer< T >::classNameForPointer(), cond::service::GetTokenFromPointer< T >::m_p, cond::DbSession::storeObject(), and AlCaHLTBitMon_QueryRunRegistry::string.

79  {
81  boost::shared_ptr<T> sptr( m_p );
82  return pooldb.storeObject(m_p,className);
83  }
static std::string classNameForPointer(T *pointer)
std::string storeObject(const T *object, const std::string &containerName)
Definition: DbSession.h:131
char const * className(const std::type_info &t)
Definition: ClassID.cc:8

Member Data Documentation

template<typename T >
T* cond::service::GetTokenFromPointer< T >::m_p