diff --git a/CondTools/DQM/interface/DQMSummaryReader.h b/CondTools/DQM/interface/DQMSummaryReader.h index cc8e0ce1f829d..752dff3a15741 100644 --- a/CondTools/DQM/interface/DQMSummaryReader.h +++ b/CondTools/DQM/interface/DQMSummaryReader.h @@ -3,9 +3,8 @@ #include "CondFormats/DQMObjects/interface/DQMSummary.h" #include "CondTools/DQM/interface/TestBase.h" -//#include "CondTools/DQM/interface/ReadBase.h" -class DQMSummaryReader : virtual public TestBase /*ReadBase*/ { +class DQMSummaryReader : virtual public TestBase { public: DQMSummaryReader(const std::string& connectionString, const std::string& user, const std::string& pass); ~DQMSummaryReader() override; diff --git a/CondTools/DQM/interface/ReadBase.h b/CondTools/DQM/interface/ReadBase.h deleted file mode 100644 index 4fab3e90c01b7..0000000000000 --- a/CondTools/DQM/interface/ReadBase.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef CondTools_DQM_ReadBase_h -#define CondTools_DQM_ReadBase_h - -/* - * \class ReadBase - * - * needed for using coral - * - * -*/ - -#include -//#include "CoralKernel/Context.h" -#include "RelationalAccess/ConnectionService.h" -#include "CoralBase/MessageStream.h" - -namespace coral { - //class IConnection; - class ISessionProxy; -} // namespace coral - -class ReadBase { -public: - ReadBase(); - virtual ~ReadBase(); - virtual void run() = 0; - void setVerbosityLevel(coral::MsgLevel level); - -protected: - coral::ISessionProxy* connect(const std::string& connectionString, - const std::string& user, - const std::string& password); - -private: - //coral::IConnection* m_connection; - coral::ConnectionService m_connectionService; -}; - -#endif diff --git a/CondTools/DQM/src/DQMSummaryReader.cc b/CondTools/DQM/src/DQMSummaryReader.cc index ef5bc2b18361a..321ec4fe03fa0 100644 --- a/CondTools/DQM/src/DQMSummaryReader.cc +++ b/CondTools/DQM/src/DQMSummaryReader.cc @@ -21,10 +21,7 @@ DQMSummaryReader::DQMSummaryReader(const std::string& connectionString, const std::string& user, const std::string& pass) - : TestBase(), /*ReadBase(),*/ - m_connectionString(connectionString), - m_user(user), - m_pass(pass) { + : TestBase(), m_connectionString(connectionString), m_user(user), m_pass(pass) { m_tableToRead = ""; } diff --git a/CondTools/DQM/src/ReadBase.cc b/CondTools/DQM/src/ReadBase.cc deleted file mode 100644 index ffbdfd448f8af..0000000000000 --- a/CondTools/DQM/src/ReadBase.cc +++ /dev/null @@ -1,50 +0,0 @@ -#include "CondTools/DQM/interface/ReadBase.h" -#include "RelationalAccess/IRelationalDomain.h" -#include "RelationalAccess/IConnection.h" -#include "RelationalAccess/IConnectionServiceConfiguration.h" -//#include "RelationalAccess/ISession.h" -#include "RelationalAccess/ISessionProxy.h" -#include "RelationalAccess/RelationalServiceException.h" -//#include "CoralKernel/Context.h" -#include -#include - -ReadBase::ReadBase() : m_connectionService() { - //coral::Context& context = coral::Context::instance(); - //context.loadComponent( "CORAL/RelationalPlugins/oracle" ); - //coral::IHandle domain = context.query( "CORAL/RelationalPlugins/oracle" ); - //if ( ! domain.isValid() ) - // throw std::runtime_error( "Could not load the OracleAccess plugin" ); -} - -ReadBase::~ReadBase() { - //if ( m_connection ) delete m_connection; -} - -coral::ISessionProxy* ReadBase::connect(const std::string& connectionString, - const std::string& user, - const std::string& pass) { - //coral::Context& ctx = coral::Context::instance(); - //coral::IHandle iHandle=ctx.query("CORAL/RelationalPlugins/oracle"); - //if ( ! iHandle.isValid() ) - // throw std::runtime_error( "Could not load the OracleAccess plugin" ); - // - //std::pair connectionAndSchema = iHandle->decodeUserConnectionString( connectionString ); - //if ( ! m_connection ) - // m_connection = iHandle->newConnection( connectionAndSchema.first ); - - //if ( ! m_connection->isConnected() ) - // m_connection->connect(); - - //coral::ISession* session = m_connection->newSession( connectionAndSchema.second ); - //if ( session ) - // session->startUserSession( user, pass ); - std::string userEnv("CORAL_AUTH_USER=" + user); - std::string passEnv("CORAL_AUTH_PASSWORD=" + pass); - ::putenv(const_cast(userEnv.c_str())); - ::putenv(const_cast(passEnv.c_str())); - m_connectionService.configuration().setAuthenticationService("CORAL/Services/EnvironmentAuthenticationService"); - return m_connectionService.connect(connectionString); -} - -void ReadBase::setVerbosityLevel(coral::MsgLevel level) { coral::MessageStream::setMsgVerbosity(level); }