From ab2aade41d92cac229c53f06bc66a8f1c8bfde5c Mon Sep 17 00:00:00 2001 From: Gennady Pospelov <g.pospelov@fz-juelich.de> Date: Fri, 3 Jan 2014 13:58:06 +0100 Subject: [PATCH] Debug printing to resolve isgisaxs08 test failure --- App/src/IsGISAXSTools.cpp | 4 ++-- App/src/TestFunctionalTests.cpp | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/App/src/IsGISAXSTools.cpp b/App/src/IsGISAXSTools.cpp index 372f84facd6..e3deda64848 100644 --- a/App/src/IsGISAXSTools.cpp +++ b/App/src/IsGISAXSTools.cpp @@ -692,12 +692,12 @@ void IsGISAXSTools::drawOutputDataComparisonResults( if(hasMinimum()) IsGISAXSTools::setMinimum(hmin); //if(hmax>0) IsGISAXSTools::setMaximum(hmax); if(hasMaximum()) IsGISAXSTools::setMaximum(hmax); - IsGISAXSTools::drawOutputDataInPad(data, "CONT4 Z", "this"); + IsGISAXSTools::drawOutputDataInPad(data, "CONT4 Z", "data"); // isgisaxs data c1->cd(2); gPad->SetLogz(); gPad->SetRightMargin(0.12); - IsGISAXSTools::drawOutputDataInPad(reference, "CONT4 Z", "isgi"); + IsGISAXSTools::drawOutputDataInPad(reference, "CONT4 Z", "reference"); // difference c1->cd(3); diff --git a/App/src/TestFunctionalTests.cpp b/App/src/TestFunctionalTests.cpp index 1654bedaa37..75a5435e08a 100644 --- a/App/src/TestFunctionalTests.cpp +++ b/App/src/TestFunctionalTests.cpp @@ -1,6 +1,7 @@ #include "TestFunctionalTests.h" #include "ProgramOptions.h" #include "IsGISAXSTools.h" +#include "OutputDataFunctions.h" #include <iostream> #include <vector> #include <string> @@ -13,6 +14,17 @@ void TestFunctionalTests::execute() for(size_t i=0; i<m_testNames.size(); ++i) { FunctionalTest_t test = m_testRegistry.getTest(m_testNames[i]); test->runTest(); + test->analyseResults(); + + double diff = OutputDataFunctions::GetDifference(*test->getResult(), *test->getReference()); + std::cout << "XXX " << diff << std::endl; + + for(size_t j=0; j<test->getResult()->getAllocatedSize(); ++j) { + std::cout << "AAA " << j << " " << (*test->getResult())[j] + << " " << (*test->getReference())[j] + << " diff:" << ((*test->getResult())[j] - (*test->getReference())[j])/(*test->getReference())[j] + << std::endl; + } IsGISAXSTools::drawOutputDataComparisonResults( *test->getResult(), *test->getReference(), test->getName(), test->getDescription()); -- GitLab