CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes
TestBase Class Referenceabstract

#include <TestBase.h>

Inheritance diagram for TestBase:
DQMSummaryReader L1TriggerScalerRead RunInfoRead RunSummaryRead

Public Member Functions

virtual void run ()=0
 
virtual void run ()=0
 
void setVerbosityLevel (coral::MsgLevel level)
 
void setVerbosityLevel (coral::MsgLevel level)
 
 TestBase ()
 
 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)
 

Private Attributes

coral::IConnection * m_connection
 

Detailed Description

Definition at line 21 of file TestBase.h.

Constructor & Destructor Documentation

TestBase::TestBase ( )

Definition at line 10 of file TestBase.cc.

10  :
11  m_connection( 0 ) {
12  coral::Context& context = coral::Context::instance();
13  context.loadComponent( "CORAL/RelationalPlugins/oracle" );
14  coral::IHandle<coral::IRelationalDomain> domain = context.query<coral::IRelationalDomain>( "CORAL/RelationalPlugins/oracle" );
15  if ( ! domain.isValid() )
16  throw std::runtime_error( "Could not load the OracleAccess plugin" );
17 }
coral::IConnection * m_connection
Definition: TestBase.h:33
TestBase::~TestBase ( )
virtual

Definition at line 19 of file TestBase.cc.

References m_connection.

19  {
20  if ( m_connection ) delete m_connection;
21 }
coral::IConnection * m_connection
Definition: TestBase.h:33
TestBase::TestBase ( )
virtual TestBase::~TestBase ( )
virtual

Member Function Documentation

coral::ISession * TestBase::connect ( const std::string &  connectionString,
const std::string &  user,
const std::string &  password 
)
protected

Definition at line 24 of file TestBase.cc.

References m_connection, and python.CommonUtils::session.

Referenced by python.Vispa.Gui.ZoomableScrollArea.ZoomableScrollArea::__init__(), python.Vispa.Views.PropertyView.BooleanProperty::__init__(), python.Vispa.Gui.FindDialog.FindDialog::_addScript(), python.Vispa.Gui.FindDialog.FindDialog::_addStringProperty(), python.Vispa.Main.Application.Application::_connectSignals(), python.Vispa.Plugins.ConfigEditor.CodeTableView.CodeTableView::_createItem(), python.Vispa.Gui.BoxContentDialog.BoxContentDialog::addButton(), python.Vispa.Gui.ToolBoxContainer.ToolBoxContainer::addWidget(), python.Vispa.Views.PropertyView.PropertyView::append(), python.Vispa.Views.PropertyView.PropertyView::appendAddRow(), python.Vispa.Main.Application.Application::createAction(), python.Vispa.Views.PropertyView.TextEditWithButtonProperty::createButton(), python.Vispa.Views.LineDecayView.LineDecayView::createLineDecayContainer(), python.Vispa.Views.PropertyView.TextEditWithButtonProperty::createLineEdit(), python.Vispa.Views.LineDecayView.LineDecayContainer::createObject(), python.Vispa.Views.PropertyView.TextEditWithButtonProperty::createTextEdit(), L1TriggerScalerRead::dropTable(), python.Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::filterDialog(), python.Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), python.Vispa.Gui.PortWidget.PortWidget::mouseMoveEvent(), DQMSummaryReader::readData(), RunInfoRead::readData(), RunSummaryRead::readData(), L1TriggerScalerRead::readData(), python.Vispa.Views.PropertyView.BooleanProperty::setChecked(), python.Vispa.Main.SplitterTab.SplitterTab::setController(), python.Vispa.Plugins.Browser.BrowserTab.BrowserTab::setController(), python.Vispa.Views.PropertyView.BooleanProperty::setReadOnly(), python.Vispa.Views.PropertyView.DropDownProperty::setReadOnly(), python.Vispa.Views.PropertyView.TextEditWithButtonProperty::setReadOnly(), python.Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::setTab(), python.Vispa.Views.PropertyView.IntegerProperty::setValue(), python.Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::switchCenterView(), python.Vispa.Plugins.EdmBrowser.EdmBrowserTabController.EdmBrowserTabController::updateViewMenu(), and python.Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::updateViewMenu().

26  {
27  coral::Context& ctx = coral::Context::instance();
28  coral::IHandle<coral::IRelationalDomain> iHandle=ctx.query<coral::IRelationalDomain>("CORAL/RelationalPlugins/oracle");
29  if ( ! iHandle.isValid() )
30  throw std::runtime_error( "Could not load the OracleAccess plugin" );
31 
32  std::pair<std::string, std::string> connectionAndSchema = iHandle->decodeUserConnectionString( connectionString );
33  if ( ! m_connection )
34  m_connection = iHandle->newConnection( connectionAndSchema.first );
35 
36  if ( ! m_connection->isConnected() )
37  m_connection->connect();
38 
39  coral::ISession* session = m_connection->newSession( connectionAndSchema.second );
40  if ( session )
41  session->startUserSession( user, pass );
42 
43  return session;
44 }
coral::IConnection * m_connection
Definition: TestBase.h:33
coral::ISession* TestBase::connect ( const std::string &  connectionString,
const std::string &  user,
const std::string &  password 
)
protected

Referenced by python.Vispa.Gui.ZoomableScrollArea.ZoomableScrollArea::__init__(), python.Vispa.Views.PropertyView.BooleanProperty::__init__(), python.Vispa.Gui.FindDialog.FindDialog::_addScript(), python.Vispa.Gui.FindDialog.FindDialog::_addStringProperty(), python.Vispa.Main.Application.Application::_connectSignals(), python.Vispa.Plugins.ConfigEditor.CodeTableView.CodeTableView::_createItem(), python.Vispa.Gui.BoxContentDialog.BoxContentDialog::addButton(), python.Vispa.Gui.ToolBoxContainer.ToolBoxContainer::addWidget(), python.Vispa.Views.PropertyView.PropertyView::append(), python.Vispa.Views.PropertyView.PropertyView::appendAddRow(), python.Vispa.Main.Application.Application::createAction(), python.Vispa.Views.PropertyView.TextEditWithButtonProperty::createButton(), python.Vispa.Views.LineDecayView.LineDecayView::createLineDecayContainer(), python.Vispa.Views.PropertyView.TextEditWithButtonProperty::createLineEdit(), python.Vispa.Views.LineDecayView.LineDecayContainer::createObject(), python.Vispa.Views.PropertyView.TextEditWithButtonProperty::createTextEdit(), python.Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::filterDialog(), python.Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), python.Vispa.Gui.PortWidget.PortWidget::mouseMoveEvent(), python.Vispa.Views.PropertyView.BooleanProperty::setChecked(), python.Vispa.Main.SplitterTab.SplitterTab::setController(), python.Vispa.Plugins.Browser.BrowserTab.BrowserTab::setController(), python.Vispa.Views.PropertyView.BooleanProperty::setReadOnly(), python.Vispa.Views.PropertyView.DropDownProperty::setReadOnly(), python.Vispa.Views.PropertyView.TextEditWithButtonProperty::setReadOnly(), python.Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::setTab(), python.Vispa.Views.PropertyView.IntegerProperty::setValue(), python.Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::switchCenterView(), python.Vispa.Plugins.EdmBrowser.EdmBrowserTabController.EdmBrowserTabController::updateViewMenu(), and python.Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::updateViewMenu().

virtual void TestBase::run ( )
pure virtual
virtual void TestBase::run ( )
pure virtual
void TestBase::setVerbosityLevel ( coral::MsgLevel  level)

Definition at line 47 of file TestBase.cc.

47  {
48  coral::MessageStream::setMsgVerbosity(level);
49 }
tuple level
Definition: testEve_cfg.py:34
void TestBase::setVerbosityLevel ( coral::MsgLevel  level)

Member Data Documentation

coral::IConnection * TestBase::m_connection
private

Definition at line 33 of file TestBase.h.

Referenced by connect(), and ~TestBase().