From d3398d91f93b4e780bf0cc1fbc0f3a69b9a1657d Mon Sep 17 00:00:00 2001 From: Janik Zikovsky <zikovskyjl@ornl.gov> Date: Mon, 19 Mar 2012 16:44:42 -0400 Subject: [PATCH] Refs #4472 fix to allow designer plugin to work for me under RHEL6. Should not affect anything since the NXMDisableErrorReporting() is still called. --- Code/Mantid/Framework/API/src/FrameworkManager.cpp | 5 +++++ .../Framework/DataHandling/src/LoadNexusProcessed.cpp | 1 - Code/Mantid/Framework/DataHandling/test/LoadLiveDataTest.h | 6 +++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Code/Mantid/Framework/API/src/FrameworkManager.cpp b/Code/Mantid/Framework/API/src/FrameworkManager.cpp index b81e81004d5..83837d30410 100644 --- a/Code/Mantid/Framework/API/src/FrameworkManager.cpp +++ b/Code/Mantid/Framework/API/src/FrameworkManager.cpp @@ -12,6 +12,7 @@ #include "MantidKernel/LibraryManager.h" #include "MantidKernel/Memory.h" #include <cstdarg> +#include <napi.h> #ifdef _WIN32 #include <winsock2.h> @@ -47,6 +48,10 @@ FrameworkManagerImpl::FrameworkManagerImpl() : g_log(Kernel::Logger::get("Framew { Mantid::Kernel::LibraryManager::Instance().OpenAllLibraries(pluginDir, false); } + + // Disable reporting errors from Nexus (they clutter up the output). + NXMDisableErrorReporting(); + g_log.debug() << "FrameworkManager created." << std::endl; } diff --git a/Code/Mantid/Framework/DataHandling/src/LoadNexusProcessed.cpp b/Code/Mantid/Framework/DataHandling/src/LoadNexusProcessed.cpp index b7815ef7060..135e3c79cab 100644 --- a/Code/Mantid/Framework/DataHandling/src/LoadNexusProcessed.cpp +++ b/Code/Mantid/Framework/DataHandling/src/LoadNexusProcessed.cpp @@ -84,7 +84,6 @@ LoadNexusProcessed::LoadNexusProcessed() : m_shared_bins(false), m_xbins(), m_axis1vals(), m_list(false), m_interval(false), m_spec_list(), m_spec_min(0), m_spec_max(Mantid::EMPTY_INT()),m_cppFile(NULL) { - NXMDisableErrorReporting(); } /// Delete NexusFileIO in destructor diff --git a/Code/Mantid/Framework/DataHandling/test/LoadLiveDataTest.h b/Code/Mantid/Framework/DataHandling/test/LoadLiveDataTest.h index 5f45ed0d188..1b69226fb30 100644 --- a/Code/Mantid/Framework/DataHandling/test/LoadLiveDataTest.h +++ b/Code/Mantid/Framework/DataHandling/test/LoadLiveDataTest.h @@ -130,10 +130,10 @@ public: //-------------------------------------------------------------------------------------------- void test_add_DontPreserveEvents() { - MatrixWorkspace_sptr ws1, ws2; + Workspace2D_sptr ws1, ws2; // First go creates the fake ws - ws1 = doExec<MatrixWorkspace>("Add", "Rebin", "Params=40e3, 1e3, 60e3", "", "", false); + ws1 = doExec<Workspace2D>("Add", "Rebin", "Params=40e3, 1e3, 60e3", "", "", false); TS_ASSERT_EQUALS(ws1->getNumberHistograms(), 2); double total; total = 0; @@ -142,7 +142,7 @@ public: TS_ASSERT_DELTA( total, 100.0, 1e-4); // Next one adds the histograms together - ws2 = doExec<MatrixWorkspace>("Add", "Rebin", "Params=40e3, 1e3, 60e3", "", "", false); + ws2 = doExec<Workspace2D>("Add", "Rebin", "Params=40e3, 1e3, 60e3", "", "", false); TS_ASSERT_EQUALS(ws2->getNumberHistograms(), 2); // The new total signal is 200.0 -- GitLab