#include <DbConnection.h>
Classes | |
class | ConnectionImpl |
Public Member Functions | |
void | close () |
DbConnectionConfiguration & | configuration () |
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 |
DbConnection & | operator= (const DbConnection &conn) |
coral::IWebCacheControl & | webCacheControl () const |
virtual | ~DbConnection () |
Private Attributes | |
boost::shared_ptr< ConnectionImpl > | m_implementation |
Definition at line 35 of file DbConnection.h.
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.
{ }
void DbConnection::close | ( | void | ) |
Definition at line 79 of file DbConnection.cc.
Referenced by l1t::DataManager::~DataManager().
{ m_implementation->close(); }
cond::DbConnectionConfiguration & DbConnection::configuration | ( | ) |
Definition at line 89 of file DbConnection.cc.
Referenced by CondDBESSource::CondDBESSource(), l1t::DataManager::connect(), HcalO2OManager::getListOfPoolIovs(), HcalO2OManager::getListOfPoolTags(), DTKeyedConfigHandler::getNewObjects(), DTLVStatusHandler::getNewObjects(), DTUserKeyedConfigHandler::getNewObjects(), DTHVStatusHandler::getNewObjects(), cond::FrontierProxy::initialize(), L1ConfigOnlineProdBase< TRcd, TData >::L1ConfigOnlineProdBase(), cond::PayLoadInspector< DataT >::plot(), cond::service::PoolDBOutputService::PoolDBOutputService(), l1t::DataManager::setDebug(), SiStripCoralIface::SiStripCoralIface(), cond::PayLoadInspector< DataT >::summary(), and cond::PayLoadInspector< DataT >::trend_plot().
{ return m_implementation->m_configuration; }
cond::DbConnectionConfiguration const & DbConnection::configuration | ( | ) | const |
Definition at line 94 of file DbConnection.cc.
{ return m_implementation->m_configuration; }
void DbConnection::configure | ( | ) |
Definition at line 55 of file DbConnection.cc.
Referenced by CondDBESSource::CondDBESSource(), l1t::DataManager::connect(), DbConnection(), HcalO2OManager::getListOfPoolIovs(), HcalO2OManager::getListOfPoolTags(), DTKeyedConfigHandler::getNewObjects(), DTLVStatusHandler::getNewObjects(), DTUserKeyedConfigHandler::getNewObjects(), DTHVStatusHandler::getNewObjects(), L1ConfigOnlineProdBase< TRcd, TData >::L1ConfigOnlineProdBase(), cond::PayLoadInspector< DataT >::plot(), cond::service::PoolDBOutputService::PoolDBOutputService(), SiStripCoralIface::SiStripCoralIface(), cond::PayLoadInspector< DataT >::summary(), and cond::PayLoadInspector< DataT >::trend_plot().
{ m_implementation->m_configuration.configure( m_implementation->m_connectionPool->configuration() ); m_implementation->m_initialized = true; }
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 | ) |
Definition at line 61 of file DbConnection.cc.
References cond::DbConnectionConfiguration::defaultConfigurations().
{ m_implementation->m_configuration = DbConnectionConfiguration::defaultConfigurations()[ defaultItem ]; configure(); }
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 |
Definition at line 72 of file DbConnection.cc.
References Exception.
Referenced by CondDBESSource::CondDBESSource(), l1t::DataManager::connect(), CondDBESSource::fillTagCollectionFromDB(), HcalO2OManager::getListOfPoolIovs(), HcalO2OManager::getListOfPoolTags(), DTKeyedConfigHandler::getNewObjects(), DTLVStatusHandler::getNewObjects(), DTUserKeyedConfigHandler::getNewObjects(), DTHVStatusHandler::getNewObjects(), SiStripCoralIface::initialize(), L1ConfigOnlineProdBase< TRcd, TData >::L1ConfigOnlineProdBase(), cond::PayLoadInspector< DataT >::plot(), cond::service::PoolDBOutputService::PoolDBOutputService(), cond::PayLoadInspector< DataT >::summary(), and cond::PayLoadInspector< DataT >::trend_plot().
{ if(!isOpen()) throw cond::Exception("DbConnection::createSession: cannot create session. Connection has been closed."); return cond::DbSession( *this ); }
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.
Referenced by cond::FrontierProxy::initialize().
{ if(!isOpen()) throw cond::Exception("DbConnection::webCacheControl: cannot get connection service. Connection has not been open."); return m_implementation->m_connectionPool->connectionService().webCacheControl(); }
boost::shared_ptr<ConnectionImpl> cond::DbConnection::m_implementation [private] |
Definition at line 69 of file DbConnection.h.
Referenced by operator=().