CMS 3D CMS Logo

Classes | Public Member Functions | Private Attributes

cond::DbConnection Class Reference

#include <DbConnection.h>

List of all members.

Classes

class  ConnectionImpl

Public Member Functions

void close ()
DbConnectionConfigurationconfiguration ()
DbConnectionConfiguration const & configuration () const
void configure ()
void configure (cond::DbConfigurationDefaults defaultItem)
void configure (const edm::ParameterSet &connectionPset)
boost::shared_ptr
< ora::ConnectionPool
connectionPool () const
coral::IConnectionService & connectionService () const
DbSession createSession () const
 DbConnection ()
 DbConnection (const DbConnection &conn)
bool isOpen () const
const coral::IMonitoringReporter & monitoringReporter () const
DbConnectionoperator= (const DbConnection &conn)
coral::IWebCacheControl & webCacheControl () const
virtual ~DbConnection ()

Private Attributes

boost::shared_ptr< ConnectionImplm_implementation

Detailed Description

Definition at line 35 of file DbConnection.h.


Constructor & Destructor Documentation

DbConnection::DbConnection ( )

Definition at line 37 of file DbConnection.cc.

References configure().

                              :
  m_implementation(new ConnectionImpl()){
  configure();
}
DbConnection::DbConnection ( const DbConnection conn)

Definition at line 42 of file DbConnection.cc.

                                                      :
  m_implementation( conn.m_implementation ){
}
DbConnection::~DbConnection ( ) [virtual]

Definition at line 46 of file DbConnection.cc.

                               {
}

Member Function Documentation

void DbConnection::close ( void  )

Definition at line 79 of file DbConnection.cc.

Referenced by l1t::DataManager::~DataManager().

{
  m_implementation->close();
}
cond::DbConnectionConfiguration & DbConnection::configuration ( )
cond::DbConnectionConfiguration const & DbConnection::configuration ( ) const

Definition at line 94 of file DbConnection.cc.

{
  return m_implementation->m_configuration;
}
void DbConnection::configure ( )
void DbConnection::configure ( const edm::ParameterSet connectionPset)

Definition at line 67 of file DbConnection.cc.

                                                                  {
  m_implementation->m_configuration.setParameters( connectionPset );
  configure();
}
void DbConnection::configure ( cond::DbConfigurationDefaults  defaultItem)
boost::shared_ptr< ora::ConnectionPool > DbConnection::connectionPool ( ) const

Definition at line 99 of file DbConnection.cc.

                                                                          {
  return m_implementation->m_connectionPool;
}
coral::IConnectionService & DbConnection::connectionService ( ) const

Definition at line 103 of file DbConnection.cc.

References Exception.

                                                                   {
  if(!isOpen())
    throw cond::Exception("DbConnection::connectionService: cannot get connection service. Connection has not been open.");
  return m_implementation->m_connectionPool->connectionService();
}
cond::DbSession DbConnection::createSession ( ) const
bool DbConnection::isOpen ( ) const

Definition at line 84 of file DbConnection.cc.

{
  return m_implementation->m_connectionPool.get();
}
const coral::IMonitoringReporter & DbConnection::monitoringReporter ( ) const

Definition at line 109 of file DbConnection.cc.

References Exception.

Referenced by cond::SQLReport::reportForConnection().

                                                                           {
  if(!isOpen())
    throw cond::Exception("DbConnection::monitoringReporter: cannot get connection service. Connection has not been open.");
  return m_implementation->m_connectionPool->connectionService().monitoringReporter();
}
cond::DbConnection & DbConnection::operator= ( const DbConnection conn)

Definition at line 49 of file DbConnection.cc.

References m_implementation.

{
  if(this!=&conn) m_implementation = conn.m_implementation;
  return *this;
}
coral::IWebCacheControl & DbConnection::webCacheControl ( ) const

Definition at line 115 of file DbConnection.cc.

References Exception.

                                                              {
  if(!isOpen())
    throw cond::Exception("DbConnection::webCacheControl: cannot get connection service. Connection has not been open.");
  return m_implementation->m_connectionPool->connectionService().webCacheControl();
}

Member Data Documentation

Definition at line 69 of file DbConnection.h.

Referenced by operator=().