#include <CondTools/RPC/src/TestBase.h>
Public Member Functions | |
virtual void | run ()=0 |
virtual void | run ()=0 |
virtual void | run ()=0 |
void | setVerbosityLevel (seal::Msg::Level level) |
void | setVerbosityLevel (seal::Msg::Level level) |
void | setVerbosityLevel (seal::Msg::Level level) |
TestBase () | |
TestBase () | |
TestBase () | |
virtual | ~TestBase () |
virtual | ~TestBase () |
virtual | ~TestBase () |
Protected Member Functions | |
coral::ISession * | connect (const std::string &connectionString, const std::string &user, const std::string &password) |
coral::ISession * | connect (const std::string &connectionString, const std::string &user, const std::string &password) |
coral::ISession * | connect (const std::string &connectionString, const std::string &userName, const std::string &password) |
Private Attributes | |
coral::IConnection * | m_connection |
coral::IConnection * | m_connection |
coral::IConnection * | m_connection |
seal::Handle< seal::Context > | m_context |
seal::Handle< seal::Context > | m_context |
seal::Handle< seal::Context > | m_context |
Definition at line 13 of file TestBase.h.
TestBase::TestBase | ( | ) |
Definition at line 10 of file TestBase.cc.
References DBSPlugin::get(), and m_context.
00010 : 00011 m_context( new seal::Context ), 00012 m_connection( 0 ) 00013 { 00014 seal::PluginManager* pm = seal::PluginManager::get(); 00015 pm->initialise(); 00016 seal::Handle<seal::ComponentLoader> loader = new seal::ComponentLoader( m_context.get() ); 00017 if ( ! loader->load( "CORAL/RelationalPlugins/oracle" ) ) { 00018 throw std::runtime_error( "Could not load the OracleAccess plugin" ); 00019 } 00020 }
TestBase::~TestBase | ( | ) | [virtual] |
Definition at line 23 of file TestBase.cc.
References m_connection, and m_context.
00024 { 00025 if ( m_connection ) delete m_connection; 00026 m_context = 0; 00027 }
TestBase::TestBase | ( | ) |
virtual TestBase::~TestBase | ( | ) | [virtual] |
TestBase::TestBase | ( | ) |
virtual TestBase::~TestBase | ( | ) | [virtual] |
coral::ISession* TestBase::connect | ( | const std::string & | connectionString, | |
const std::string & | user, | |||
const std::string & | password | |||
) | [protected] |
coral::ISession* TestBase::connect | ( | const std::string & | connectionString, | |
const std::string & | user, | |||
const std::string & | password | |||
) | [protected] |
coral::ISession * TestBase::connect | ( | const std::string & | connectionString, | |
const std::string & | userName, | |||
const std::string & | password | |||
) | [protected] |
Definition at line 31 of file TestBase.cc.
References m_connection, m_context, and python::TagTree::session.
Referenced by RPCFw::createIMON(), RPCFw::createSTATUS(), RPCFw::createVMON(), WriteDQMSummeryIntoOMDS::dropTable(), L1TriggerScalerRead::dropTable(), WriteDQMSummeryIntoOMDS::dropView(), RunSummaryRead::readData(), RunInfoRead::readData(), L1TriggerScalerRead::readData(), and WriteDQMSummeryIntoOMDS::writeData().
00034 { 00035 seal::IHandle<coral::IRelationalDomain> iHandle = m_context->query<coral::IRelationalDomain>( "CORAL/RelationalPlugins/oracle" ); 00036 if ( ! iHandle ) { 00037 throw coral::NonExistingDomainException( "oracle" ); 00038 } 00039 00040 std::pair<std::string, std::string> connectionAndSchema = iHandle->decodeUserConnectionString( connectionString ); 00041 00042 if ( ! m_connection ) 00043 m_connection = iHandle->newConnection( connectionAndSchema.first ); 00044 00045 if ( ! m_connection->isConnected() ) 00046 m_connection->connect(); 00047 00048 coral::ISession* session = m_connection->newSession( connectionAndSchema.second ); 00049 00050 if ( session ) { 00051 session->startUserSession( userName, password ); 00052 } 00053 00054 return session; 00055 }
virtual void TestBase::run | ( | ) | [pure virtual] |
Implemented in RPCFw, L1TriggerScalerRead, RunInfoRead, RunSummaryRead, and WriteDQMSummeryIntoOMDS.
virtual void TestBase::run | ( | ) | [pure virtual] |
Implemented in RPCFw, L1TriggerScalerRead, RunInfoRead, RunSummaryRead, and WriteDQMSummeryIntoOMDS.
virtual void TestBase::run | ( | ) | [pure virtual] |
Implemented in RPCFw, L1TriggerScalerRead, RunInfoRead, RunSummaryRead, and WriteDQMSummeryIntoOMDS.
void TestBase::setVerbosityLevel | ( | seal::Msg::Level | level | ) |
void TestBase::setVerbosityLevel | ( | seal::Msg::Level | level | ) |
void TestBase::setVerbosityLevel | ( | seal::Msg::Level | level | ) |
Definition at line 59 of file TestBase.cc.
References m_context.
00060 { 00061 std::vector< seal::Handle<seal::IMessageService> > v_msgSvc; 00062 m_context->query( v_msgSvc ); 00063 if ( v_msgSvc.empty() ) { 00064 seal::Handle<seal::ComponentLoader> loader = new seal::ComponentLoader( m_context.get() ); 00065 if ( ! loader->load( "SEAL/Services/MessageService" ) ) { 00066 throw std::runtime_error( "Could not load the seal message service" ); 00067 } 00068 00069 m_context->query( v_msgSvc ); 00070 if ( v_msgSvc.empty() ) { 00071 throw std::runtime_error( "Could not load the seal message service" ); 00072 } 00073 } 00074 seal::Handle<seal::IMessageService>& msgSvc = v_msgSvc.front(); 00075 msgSvc->setOutputLevel( level ); 00076 }
coral::IConnection* TestBase::m_connection [private] |
Definition at line 37 of file TestBase.h.
coral::IConnection* TestBase::m_connection [private] |
Definition at line 36 of file TestBase.h.
coral::IConnection* TestBase::m_connection [private] |
seal::Handle<seal::Context> TestBase::m_context [private] |
Definition at line 36 of file TestBase.h.
seal::Handle<seal::Context> TestBase::m_context [private] |
Definition at line 35 of file TestBase.h.
seal::Handle<seal::Context> TestBase::m_context [private] |
Definition at line 27 of file TestBase.h.
Referenced by connect(), setVerbosityLevel(), TestBase(), and ~TestBase().