Loading Makefile +1 −1 Original line number Diff line number Diff line #================================================================================ EXEC_NAME=fitsImporter-srv INST_NAME=test DEBUG_LEV=-v7 DEBUG_LEV=-v1 #================================================================================ INC_DIR=/usr/local/omniORB-4.1.7/include \ /usr/local/zeromq-3.2.3/include/zmq \ Loading src/DMDBVerifier.cpp +20 −3 Original line number Diff line number Diff line Loading @@ -66,6 +66,12 @@ void DMDBVerifier::testInstrumentMapping(Instrument::SP instrument_sp) Destination::SP destination_sp = instrument_sp->getDestination(); #ifdef VERBOSE_DEBUG INFO_STREAM << destination_sp->getHost() << ":" << destination_sp->getPort() << " " << destination_sp->getSchema() << "." << destination_sp->getTable() << endl; INFO_STREAM << "-------------------------------------------------" << endl; #endif Mapping::SPVector mapping_spvector = destination_sp->getMappingSPVector(); ConnectionManager::SessionSP session_sp = Loading Loading @@ -97,7 +103,7 @@ void DMDBVerifier::testInstrumentMapping(Instrument::SP instrument_sp) { std::stringstream error_stream; error_stream << "DMDBVerifier::testInstrumentMapping() " << destination_sp->getHost() << ":" << destination_sp->getPort() << destination_sp->getHost() << ":" << destination_sp->getPort() << " " << destination_sp->getSchema() << "." << destination_sp->getTable() << " " << ex.what(); throw std::runtime_error(error_stream.str()); Loading @@ -123,7 +129,7 @@ void DMDBVerifier::testColumnDefinition(ColumnTupleVector& columnTuple_vector, throw std::runtime_error(error_stream.str()); } if(it->get<1>()) if(!it->get<1>()) { std::stringstream error_stream; error_stream << "\"" << columnName << "\" empty column type " Loading @@ -131,6 +137,12 @@ void DMDBVerifier::testColumnDefinition(ColumnTupleVector& columnTuple_vector, throw std::runtime_error(error_stream.str()); } #ifdef VERBOSE_DEBUG INFO_STREAM << "Column name: " << it->get<0>().get() << " column type: " << it->get<1>().get() << endl; INFO_STREAM << "-------------------------------------------------" << endl; #endif if(it->get<1>().get().find(columnType) == std::string::npos) { std::stringstream error_stream; Loading @@ -138,13 +150,18 @@ void DMDBVerifier::testColumnDefinition(ColumnTupleVector& columnTuple_vector, << columnType << "\" type differs form information schema"; throw std::runtime_error(error_stream.str()); } #ifdef VERBOSE_DEBUG INFO_STREAM << "Column name: " << columnName << " column type: " << columnType << " OK" << endl; INFO_STREAM << "-------------------------------------------------" << endl; #endif } //============================================================================== // DMDBVerifier::isEqual() //============================================================================== bool DMDBVerifier::isEqual(ColumnTuple columnTuple, std::string columnName) throw(std::runtime_error) { DEBUG_STREAM << "DMDBVerifier::isEqual()" << endl; Loading src/DMDBVerifier.h +1 −2 Original line number Diff line number Diff line Loading @@ -66,8 +66,7 @@ protected: virtual void testColumnDefinition(ColumnTupleVector&, std::string, std::string) throw(std::runtime_error); virtual bool isEqual(ColumnTuple, std::string) throw(std::runtime_error); virtual bool isEqual(ColumnTuple, std::string); //------------------------------------------------------------------------------ // [Protected] Class variables Loading src/EventThread.cpp +19 −0 Original line number Diff line number Diff line #include <EventThread.h> #include <FitsImporter.h> #include <DMDBVerifier.h> #include <WorkerThread.h> #include <cassert> Loading Loading @@ -70,6 +71,8 @@ void EventThread::start() throw(std::runtime_error) initConnectionManager(); verifyDMDBMapping(); initThreadGroup(); } Loading Loading @@ -187,6 +190,22 @@ void EventThread::initConnectionManager() throw(std::runtime_error) m_configuration_sp, m_instrumentList_spvector); } //============================================================================== // EventThread::verifyDMDBMapping() //============================================================================== void EventThread::verifyDMDBMapping() throw(std::runtime_error) { DEBUG_STREAM << "EventThread::verifyDMDBMapping()" << endl; DMDBVerifier::SP dMDBVerifier_sp = DMDBVerifier::create(m_fitsImporter_p, m_connectionManager_sp); dMDBVerifier_sp->testInstrumentListMapping(m_instrumentList_spvector); if(m_defaultInstrument_sp) dMDBVerifier_sp->testInstrumentMapping(m_defaultInstrument_sp); } //============================================================================== // EventThread::initThreadGroup() //============================================================================== Loading src/EventThread.h +2 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,8 @@ protected: virtual void initConnectionManager() throw(std::runtime_error); virtual void verifyDMDBMapping() throw(std::runtime_error); virtual void initThreadGroup() throw(std::runtime_error); virtual void eventLoop(); Loading src/DMDBImporter.cpp +1 −1 File changed.Contains only whitespace changes. Show changes Loading
Makefile +1 −1 Original line number Diff line number Diff line #================================================================================ EXEC_NAME=fitsImporter-srv INST_NAME=test DEBUG_LEV=-v7 DEBUG_LEV=-v1 #================================================================================ INC_DIR=/usr/local/omniORB-4.1.7/include \ /usr/local/zeromq-3.2.3/include/zmq \ Loading
src/DMDBVerifier.cpp +20 −3 Original line number Diff line number Diff line Loading @@ -66,6 +66,12 @@ void DMDBVerifier::testInstrumentMapping(Instrument::SP instrument_sp) Destination::SP destination_sp = instrument_sp->getDestination(); #ifdef VERBOSE_DEBUG INFO_STREAM << destination_sp->getHost() << ":" << destination_sp->getPort() << " " << destination_sp->getSchema() << "." << destination_sp->getTable() << endl; INFO_STREAM << "-------------------------------------------------" << endl; #endif Mapping::SPVector mapping_spvector = destination_sp->getMappingSPVector(); ConnectionManager::SessionSP session_sp = Loading Loading @@ -97,7 +103,7 @@ void DMDBVerifier::testInstrumentMapping(Instrument::SP instrument_sp) { std::stringstream error_stream; error_stream << "DMDBVerifier::testInstrumentMapping() " << destination_sp->getHost() << ":" << destination_sp->getPort() << destination_sp->getHost() << ":" << destination_sp->getPort() << " " << destination_sp->getSchema() << "." << destination_sp->getTable() << " " << ex.what(); throw std::runtime_error(error_stream.str()); Loading @@ -123,7 +129,7 @@ void DMDBVerifier::testColumnDefinition(ColumnTupleVector& columnTuple_vector, throw std::runtime_error(error_stream.str()); } if(it->get<1>()) if(!it->get<1>()) { std::stringstream error_stream; error_stream << "\"" << columnName << "\" empty column type " Loading @@ -131,6 +137,12 @@ void DMDBVerifier::testColumnDefinition(ColumnTupleVector& columnTuple_vector, throw std::runtime_error(error_stream.str()); } #ifdef VERBOSE_DEBUG INFO_STREAM << "Column name: " << it->get<0>().get() << " column type: " << it->get<1>().get() << endl; INFO_STREAM << "-------------------------------------------------" << endl; #endif if(it->get<1>().get().find(columnType) == std::string::npos) { std::stringstream error_stream; Loading @@ -138,13 +150,18 @@ void DMDBVerifier::testColumnDefinition(ColumnTupleVector& columnTuple_vector, << columnType << "\" type differs form information schema"; throw std::runtime_error(error_stream.str()); } #ifdef VERBOSE_DEBUG INFO_STREAM << "Column name: " << columnName << " column type: " << columnType << " OK" << endl; INFO_STREAM << "-------------------------------------------------" << endl; #endif } //============================================================================== // DMDBVerifier::isEqual() //============================================================================== bool DMDBVerifier::isEqual(ColumnTuple columnTuple, std::string columnName) throw(std::runtime_error) { DEBUG_STREAM << "DMDBVerifier::isEqual()" << endl; Loading
src/DMDBVerifier.h +1 −2 Original line number Diff line number Diff line Loading @@ -66,8 +66,7 @@ protected: virtual void testColumnDefinition(ColumnTupleVector&, std::string, std::string) throw(std::runtime_error); virtual bool isEqual(ColumnTuple, std::string) throw(std::runtime_error); virtual bool isEqual(ColumnTuple, std::string); //------------------------------------------------------------------------------ // [Protected] Class variables Loading
src/EventThread.cpp +19 −0 Original line number Diff line number Diff line #include <EventThread.h> #include <FitsImporter.h> #include <DMDBVerifier.h> #include <WorkerThread.h> #include <cassert> Loading Loading @@ -70,6 +71,8 @@ void EventThread::start() throw(std::runtime_error) initConnectionManager(); verifyDMDBMapping(); initThreadGroup(); } Loading Loading @@ -187,6 +190,22 @@ void EventThread::initConnectionManager() throw(std::runtime_error) m_configuration_sp, m_instrumentList_spvector); } //============================================================================== // EventThread::verifyDMDBMapping() //============================================================================== void EventThread::verifyDMDBMapping() throw(std::runtime_error) { DEBUG_STREAM << "EventThread::verifyDMDBMapping()" << endl; DMDBVerifier::SP dMDBVerifier_sp = DMDBVerifier::create(m_fitsImporter_p, m_connectionManager_sp); dMDBVerifier_sp->testInstrumentListMapping(m_instrumentList_spvector); if(m_defaultInstrument_sp) dMDBVerifier_sp->testInstrumentMapping(m_defaultInstrument_sp); } //============================================================================== // EventThread::initThreadGroup() //============================================================================== Loading
src/EventThread.h +2 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,8 @@ protected: virtual void initConnectionManager() throw(std::runtime_error); virtual void verifyDMDBMapping() throw(std::runtime_error); virtual void initThreadGroup() throw(std::runtime_error); virtual void eventLoop(); Loading