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 | Private Attributes
cond::PayloadRef< DataT > Class Template Reference

#include <PayloadRef.h>

Public Member Functions

void clear ()
 
bool load (DbSession &dbSess, std::string const &itoken)
 
const DataT & operator* () const
 
 PayloadRef ()
 
 ~PayloadRef ()
 

Private Attributes

boost::shared_ptr< DataT > m_Data
 

Detailed Description

template<typename DataT>
class cond::PayloadRef< DataT >

Definition at line 10 of file PayloadRef.h.

Constructor & Destructor Documentation

template<typename DataT>
cond::PayloadRef< DataT >::PayloadRef ( )
inline

Definition at line 13 of file PayloadRef.h.

13 {}
template<typename DataT>
cond::PayloadRef< DataT >::~PayloadRef ( )
inline

Definition at line 14 of file PayloadRef.h.

14 {}

Member Function Documentation

template<typename DataT>
void cond::PayloadRef< DataT >::clear ( void  )
inline
template<typename DataT>
bool cond::PayloadRef< DataT >::load ( DbSession dbSess,
std::string const &  itoken 
)
inline

Definition at line 26 of file PayloadRef.h.

Referenced by MatrixToProcess.MatrixToProcess::getProcess(), and MatrixToProcess.MatrixToProcess::listAll().

26  {
27  clear();
28  bool ok = false;
29  // is it ok to open a transaction here? or could be at higher level?
30  boost::shared_ptr<DataT> tmp = dbSess.getTypedObject<DataT>( itoken );
31  if (tmp.get()) {
32  m_Data = tmp;
33  ok = true;
34  }
35  return ok;
36  }
boost::shared_ptr< DataT > m_Data
Definition: PayloadRef.h:40
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
template<typename DataT>
const DataT& cond::PayloadRef< DataT >::operator* ( ) const
inline

Definition at line 17 of file PayloadRef.h.

17  {
18  return *m_Data;
19  }
boost::shared_ptr< DataT > m_Data
Definition: PayloadRef.h:40

Member Data Documentation

template<typename DataT>
boost::shared_ptr<DataT> cond::PayloadRef< DataT >::m_Data
private