From f9d97ba59223f9954b7874b6bb4494b247e549c6 Mon Sep 17 00:00:00 2001
From: Roman Tolchenov <roman.tolchenov@stfc.ac.uk>
Date: Tue, 2 Dec 2014 10:59:58 +0000
Subject: [PATCH] Re #10123. Returned size_t to the column types.

size_t is converted to uint64_t on saving to nexus.
---
 .../test/CheckWorkspacesMatchTest.h           |   2 +-
 .../MantidDataHandling/LoadNexusProcessed.h   |   2 +-
 .../DataHandling/src/LoadNexusProcessed.cpp   |  28 +++++++++---------
 .../test/LoadNexusProcessedTest.h             |   2 +-
 .../test/SaveNexusProcessedTest.h             |   4 +--
 .../Framework/DataObjects/src/TableColumn.cpp |   2 +-
 .../DataObjects/test/TableWorkspaceTest.h     |   6 ++--
 .../src/ConvertToMDMinMaxLocal.cpp            |   2 +-
 .../src/PreprocessDetectorsToMD.cpp           |  12 ++++----
 .../test/PreprocessDetectorsToMDTest.h        |   6 ++--
 .../Framework/MDEvents/src/ConvToMDBase.cpp   |   2 +-
 .../MDEvents/test/MDTransfModQTest.h          |   2 +-
 .../Nexus/inc/MantidNexus/NexusFileIO.h       |   2 +-
 .../Framework/Nexus/src/NexusFileIO.cpp       |  24 +++++++--------
 .../src/WorkspaceCreationHelper.cpp           |  12 ++++----
 Test/AutoTestData/SavedTableWorkspace.nxs     | Bin 20640 -> 20640 bytes
 16 files changed, 54 insertions(+), 54 deletions(-)

diff --git a/Code/Mantid/Framework/Algorithms/test/CheckWorkspacesMatchTest.h b/Code/Mantid/Framework/Algorithms/test/CheckWorkspacesMatchTest.h
index 7bb087b2266..36aa30bbf00 100644
--- a/Code/Mantid/Framework/Algorithms/test/CheckWorkspacesMatchTest.h
+++ b/Code/Mantid/Framework/Algorithms/test/CheckWorkspacesMatchTest.h
@@ -902,7 +902,7 @@ private:
     table->addColumn("int","int");
     table->addColumn("uint","uint");
     table->addColumn("long64","int64");
-    table->addColumn("ulong64","uint64");
+    table->addColumn("size_t","size_t");
     table->addColumn("float","float");
     table->addColumn("double","double");
     table->addColumn("bool","bool");
diff --git a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadNexusProcessed.h b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadNexusProcessed.h
index feb3a0c45c1..dfc2cc4ada0 100644
--- a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadNexusProcessed.h
+++ b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadNexusProcessed.h
@@ -98,7 +98,7 @@ namespace Mantid
       API::Workspace_sptr loadTableEntry(Mantid::NeXus::NXEntry& entry);
 
       /// Load a numeric column to the TableWorkspace.
-      template<typename Type>
+      template<typename ColumnType, typename NexusType>
       void loadNumericColumn(const Mantid::NeXus::NXData& tableData,
                             const std::string& dataSetName,
                             const API::ITableWorkspace_sptr& tableWs,
diff --git a/Code/Mantid/Framework/DataHandling/src/LoadNexusProcessed.cpp b/Code/Mantid/Framework/DataHandling/src/LoadNexusProcessed.cpp
index 172b02d2b82..081abde883c 100644
--- a/Code/Mantid/Framework/DataHandling/src/LoadNexusProcessed.cpp
+++ b/Code/Mantid/Framework/DataHandling/src/LoadNexusProcessed.cpp
@@ -762,13 +762,13 @@ int64_t          index_start = indices[wi];
        * @param tableWs     :: Workspace to add column to
        * @param columnType  :: Name of the column type to create
        */
-      template<typename Type>
+      template<typename ColumnType, typename NexusType>
       void LoadNexusProcessed::loadNumericColumn(const Mantid::NeXus::NXData& tableData,
                             const std::string& dataSetName,
                             const API::ITableWorkspace_sptr& tableWs,
                             const std::string& columnType)
       {
-        NXDataSetTyped<Type> data = tableData.openNXDataSet<Type>(dataSetName);
+        NXDataSetTyped<NexusType> data = tableData.openNXDataSet<NexusType>(dataSetName);
         std::string columnTitle = data.attributes("name");
         if (!columnTitle.empty())
         {
@@ -788,7 +788,7 @@ int64_t          index_start = indices[wi];
           auto column = tableWs->addColumn(columnType, columnTitle);
           for (size_t i = 0; i < length; i++)
           {
-            column->cell<Type>(i) = *(data() + i);
+            column->cell<ColumnType>(i) = static_cast<ColumnType>(*(data() + i));
           }
         }
       }
@@ -821,36 +821,36 @@ int64_t          index_start = indices[wi];
         {
           if (info.type == NX_FLOAT64)
           {
-            loadNumericColumn<double>( nx_tw, dataSetName, workspace, "double" );
+            loadNumericColumn<double,double>( nx_tw, dataSetName, workspace, "double" );
           }
           else if (info.type == NX_INT32)
           {
-            loadNumericColumn<int>( nx_tw, dataSetName, workspace, "int" );
+            loadNumericColumn<int,int32_t>( nx_tw, dataSetName, workspace, "int" );
           }
           else if (info.type == NX_UINT32)
           {
-            loadNumericColumn<uint32_t>( nx_tw, dataSetName, workspace, "uint" );
+            loadNumericColumn<uint32_t,uint32_t>( nx_tw, dataSetName, workspace, "uint" );
           }
           else if (info.type == NX_INT64)
           {
-            loadNumericColumn<int64_t>( nx_tw, dataSetName, workspace, "long64" );
+            loadNumericColumn<int64_t,int64_t>( nx_tw, dataSetName, workspace, "long64" );
           }
           else if (info.type == NX_UINT64)
           {
-            loadNumericColumn<int64_t>( nx_tw, dataSetName, workspace, "ulong64" );
+            loadNumericColumn<size_t,uint64_t>( nx_tw, dataSetName, workspace, "size_t" );
           }
           else if (info.type == NX_FLOAT32)
           {
-            loadNumericColumn<float>( nx_tw, dataSetName, workspace, "float" );
+            loadNumericColumn<float,float>( nx_tw, dataSetName, workspace, "float" );
           }
           else if (info.type == NX_UINT8)
           {
-            loadNumericColumn<Boolean>( nx_tw, dataSetName, workspace, "bool" );
+            loadNumericColumn<bool,bool>( nx_tw, dataSetName, workspace, "bool" );
+          }
+          else
+          {
+            throw std::logic_error("Column with Nexus data type " + boost::lexical_cast<std::string>(info.type) + " cannot be loaded.");
           }
-          //else
-          //{
-          //  throw std::logic_error("Column with Nexus data type " + boost::lexical_cast<std::string>(info.type) + " cannot be loaded.");
-          //}
         }
         else if (info.rank == 2)
         {
diff --git a/Code/Mantid/Framework/DataHandling/test/LoadNexusProcessedTest.h b/Code/Mantid/Framework/DataHandling/test/LoadNexusProcessedTest.h
index 86d9261bcfb..a4e78797160 100644
--- a/Code/Mantid/Framework/DataHandling/test/LoadNexusProcessedTest.h
+++ b/Code/Mantid/Framework/DataHandling/test/LoadNexusProcessedTest.h
@@ -603,7 +603,7 @@ public:
         TS_ASSERT_DELTA( column[3], 0.4, 0.000001 );
       }
       {
-        ConstColumnVector<uint64_t> column = ws->getVector("Size");
+        ConstColumnVector<size_t> column = ws->getVector("Size");
         TS_ASSERT_EQUALS( column[0], 25);
         TS_ASSERT_EQUALS( column[1], 23);
         TS_ASSERT_EQUALS( column[2], 22);
diff --git a/Code/Mantid/Framework/DataHandling/test/SaveNexusProcessedTest.h b/Code/Mantid/Framework/DataHandling/test/SaveNexusProcessedTest.h
index 1d6ca9fafd1..f770f4f0944 100644
--- a/Code/Mantid/Framework/DataHandling/test/SaveNexusProcessedTest.h
+++ b/Code/Mantid/Framework/DataHandling/test/SaveNexusProcessedTest.h
@@ -596,9 +596,9 @@ public:
       data[1] = 22;
       data[2] = 23;
     }
-    table->addColumn("ulong64", "SizeColumn");
+    table->addColumn("size_t", "SizeColumn");
     {
-      auto& data = table->getColVector<uint64_t>("SizeColumn");
+      auto& data = table->getColVector<size_t>("SizeColumn");
       data[0] = 35;
       data[1] = 32;
       data[2] = 33;
diff --git a/Code/Mantid/Framework/DataObjects/src/TableColumn.cpp b/Code/Mantid/Framework/DataObjects/src/TableColumn.cpp
index 284d893888b..e4efae51efb 100644
--- a/Code/Mantid/Framework/DataObjects/src/TableColumn.cpp
+++ b/Code/Mantid/Framework/DataObjects/src/TableColumn.cpp
@@ -10,7 +10,7 @@ namespace DataObjects
 DECLARE_TABLECOLUMN(int,int)
 DECLARE_TABLECOLUMN(uint32_t,uint)
 DECLARE_TABLECOLUMN(int64_t,long64)
-DECLARE_TABLECOLUMN(uint64_t,ulong64)
+DECLARE_TABLECOLUMN(size_t,size_t)
 DECLARE_TABLECOLUMN(float,float)
 DECLARE_TABLECOLUMN(double,double)
 DECLARE_TABLECOLUMN(API::Boolean,bool)
diff --git a/Code/Mantid/Framework/DataObjects/test/TableWorkspaceTest.h b/Code/Mantid/Framework/DataObjects/test/TableWorkspaceTest.h
index cc934cddd2a..c3f2ec51de0 100644
--- a/Code/Mantid/Framework/DataObjects/test/TableWorkspaceTest.h
+++ b/Code/Mantid/Framework/DataObjects/test/TableWorkspaceTest.h
@@ -353,12 +353,12 @@ public:
   {
 
     TableWorkspace tw(3);
-    tw.addColumn("ulong64","SizeT");
+    tw.addColumn("size_t","SizeT");
     tw.addColumn("double","Double");
     tw.addColumn("str","String");
 
 
-    auto &SizeTData = tw.getColVector<uint64_t>("SizeT");
+    auto &SizeTData = tw.getColVector<size_t>("SizeT");
     TS_ASSERT_THROWS(tw.getColVector<int>("Double"),std::runtime_error);
     std::vector<double> &DoublData = tw.getColVector<double>("Double");
     std::vector<std::string> &StrData = tw.getColVector<std::string>("String");
@@ -374,7 +374,7 @@ public:
     StrData[1] = "2";
     StrData[2] = "3";
 
-    auto SizeTDataI = tw.getColVector<uint64_t>(0);
+    auto SizeTDataI = tw.getColVector<size_t>(0);
     TS_ASSERT_THROWS(tw.getColVector<int>(1),std::runtime_error);
     auto DoublDataI = tw.getColVector<double>(1);
     auto StrDataI = tw.getColVector<std::string>(2);
diff --git a/Code/Mantid/Framework/MDAlgorithms/src/ConvertToMDMinMaxLocal.cpp b/Code/Mantid/Framework/MDAlgorithms/src/ConvertToMDMinMaxLocal.cpp
index 3c05b4aee95..4264650c0a8 100644
--- a/Code/Mantid/Framework/MDAlgorithms/src/ConvertToMDMinMaxLocal.cpp
+++ b/Code/Mantid/Framework/MDAlgorithms/src/ConvertToMDMinMaxLocal.cpp
@@ -153,7 +153,7 @@ namespace Mantid
 
       // 
       long nHist =static_cast<long>(inWS->getNumberHistograms());
-      auto detIDMap = WSDescription.m_PreprDetTable->getColVector<uint64_t>("detIDMap");
+      auto detIDMap = WSDescription.m_PreprDetTable->getColVector<size_t>("detIDMap");
 
       // vector to place transformed coordinates;
       std::vector<coord_t> locCoord(nDims);
diff --git a/Code/Mantid/Framework/MDAlgorithms/src/PreprocessDetectorsToMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/PreprocessDetectorsToMD.cpp
index 30eae5a2c35..4c3d8c5c087 100644
--- a/Code/Mantid/Framework/MDAlgorithms/src/PreprocessDetectorsToMD.cpp
+++ b/Code/Mantid/Framework/MDAlgorithms/src/PreprocessDetectorsToMD.cpp
@@ -111,9 +111,9 @@ namespace Mantid
       // the detector ID;
       if(!targWS->addColumn("int","DetectorID"))throw(std::runtime_error("Can not add column DetectorID"));
       // stores spectra index which corresponds to a valid detector index;
-      if(!targWS->addColumn("ulong64","detIDMap"))throw(std::runtime_error("Can not add column detIDMap"));
+      if(!targWS->addColumn("size_t","detIDMap"))throw(std::runtime_error("Can not add column detIDMap"));
       // stores detector index which corresponds to the workspace index;
-      if(!targWS->addColumn("ulong64","spec2detMap"))throw(std::runtime_error("Can not add column spec2detMap"));
+      if(!targWS->addColumn("size_t","spec2detMap"))throw(std::runtime_error("Can not add column spec2detMap"));
 
       m_getIsMasked = this->getProperty("GetMaskState");
       if(m_getIsMasked)  // as bool is presented in vectors as a class, we are using int instead of bool
@@ -170,9 +170,9 @@ namespace Mantid
       targWS->logs()->addProperty<bool>("FakeDetectors",false,true);
 
       // get access to the workspace memory
-      auto &sp2detMap  = targWS->getColVector<uint64_t>("spec2detMap");
+      auto &sp2detMap  = targWS->getColVector<size_t>("spec2detMap");
       auto &detId      = targWS->getColVector<int32_t>("DetectorID");
-      auto &detIDMap   = targWS->getColVector<uint64_t>("detIDMap");
+      auto &detIDMap   = targWS->getColVector<size_t>("detIDMap");
       auto &L2         = targWS->getColVector<double>("L2");
       auto &TwoTheta   = targWS->getColVector<double>("TwoTheta");
       auto &Azimuthal  = targWS->getColVector<double>("Azimuthal");
@@ -332,9 +332,9 @@ namespace Mantid
 
 
       // get access to the workspace memory
-      auto &sp2detMap  = targWS->getColVector<uint64_t>("spec2detMap");
+      auto &sp2detMap  = targWS->getColVector<size_t>("spec2detMap");
       auto &detId      = targWS->getColVector<int32_t>("DetectorID");
-      auto &detIDMap   = targWS->getColVector<uint64_t>("detIDMap");
+      auto &detIDMap   = targWS->getColVector<size_t>("detIDMap");
       auto &L2         = targWS->getColVector<double>("L2");
       auto &TwoTheta   = targWS->getColVector<double>("TwoTheta");
       auto &Azimuthal  = targWS->getColVector<double>("Azimuthal");
diff --git a/Code/Mantid/Framework/MDAlgorithms/test/PreprocessDetectorsToMDTest.h b/Code/Mantid/Framework/MDAlgorithms/test/PreprocessDetectorsToMDTest.h
index d5efe79d150..fdee047eed2 100644
--- a/Code/Mantid/Framework/MDAlgorithms/test/PreprocessDetectorsToMDTest.h
+++ b/Code/Mantid/Framework/MDAlgorithms/test/PreprocessDetectorsToMDTest.h
@@ -61,7 +61,7 @@ void testPreprocessDetectors()
 
   size_t nVal = tws->rowCount();
 
-  const std::vector<size_t> & spec2detMap = tws->getColVector<uint64_t>("spec2detMap");
+  const std::vector<size_t> & spec2detMap = tws->getColVector<size_t>("spec2detMap");
   for(size_t i=0;i<nVal;i++)
   {
     TS_ASSERT_EQUALS(i,spec2detMap[i]);
@@ -90,9 +90,9 @@ void testFakeDetectors()
 
   size_t nVal = tws->rowCount();
 
-  auto & spec2detMap = tws->getColVector<uint64_t>("spec2detMap");
+  auto & spec2detMap = tws->getColVector<size_t>("spec2detMap");
   auto & detId       = tws->getColVector<int32_t>("DetectorID");
-  auto &detIDMap     = tws->getColVector<uint64_t>("detIDMap");
+  auto &detIDMap     = tws->getColVector<size_t>("detIDMap");
   auto &L2         = tws->getColVector<double>("L2");
   auto &TwoTheta   = tws->getColVector<double>("TwoTheta");
   auto &Azimuthal  = tws->getColVector<double>("Azimuthal");
diff --git a/Code/Mantid/Framework/MDEvents/src/ConvToMDBase.cpp b/Code/Mantid/Framework/MDEvents/src/ConvToMDBase.cpp
index 16a180357fa..1df4f0dae73 100644
--- a/Code/Mantid/Framework/MDEvents/src/ConvToMDBase.cpp
+++ b/Code/Mantid/Framework/MDEvents/src/ConvToMDBase.cpp
@@ -28,7 +28,7 @@ namespace Mantid
 
       // number of valid spectra is equal to actual number of valid detectors in spectra-det map
       m_NSpectra = WSD.m_PreprDetTable->getLogs()->getPropertyValueAsType<uint32_t>("ActualDetectorsNum");
-      m_detIDMap = WSD.m_PreprDetTable->getColVector<uint64_t>("detIDMap");
+      m_detIDMap = WSD.m_PreprDetTable->getColVector<size_t>("detIDMap");
       m_detID    = WSD.m_PreprDetTable->getColVector<int>("DetectorID");
 
     
diff --git a/Code/Mantid/Framework/MDEvents/test/MDTransfModQTest.h b/Code/Mantid/Framework/MDEvents/test/MDTransfModQTest.h
index 06c96523673..05215b3fa06 100644
--- a/Code/Mantid/Framework/MDEvents/test/MDTransfModQTest.h
+++ b/Code/Mantid/Framework/MDEvents/test/MDTransfModQTest.h
@@ -84,7 +84,7 @@ public:
     double signal(1),errorSq(1);
     unsigned int nDims = WSDescr.nDimensions();
 
-    auto detIDMap = WSDescr.m_PreprDetTable->getColVector<uint64_t>("detIDMap");
+    auto detIDMap = WSDescr.m_PreprDetTable->getColVector<size_t>("detIDMap");
  
     std::vector<coord_t> locCoord(nDims);
     std::vector<coord_t> minCoord(nDims,FLT_MAX);
diff --git a/Code/Mantid/Framework/Nexus/inc/MantidNexus/NexusFileIO.h b/Code/Mantid/Framework/Nexus/inc/MantidNexus/NexusFileIO.h
index 1f777b25189..e53b6ebc374 100644
--- a/Code/Mantid/Framework/Nexus/inc/MantidNexus/NexusFileIO.h
+++ b/Code/Mantid/Framework/Nexus/inc/MantidNexus/NexusFileIO.h
@@ -199,7 +199,7 @@ namespace Mantid
                                   const std::string& interpret_as) const;
 
       /// Save a numeric columns of a TableWorkspace to currently open nexus file.
-      template<typename T>
+      template<typename ColumnT, typename NexusT>
       void writeTableColumn(int type, const std::string& interpret_as, const API::Column& col, const std::string& columnName) const;
     };
     
diff --git a/Code/Mantid/Framework/Nexus/src/NexusFileIO.cpp b/Code/Mantid/Framework/Nexus/src/NexusFileIO.cpp
index f83eede35f9..fb37977b452 100644
--- a/Code/Mantid/Framework/Nexus/src/NexusFileIO.cpp
+++ b/Code/Mantid/Framework/Nexus/src/NexusFileIO.cpp
@@ -521,15 +521,15 @@ namespace Mantid
       * @param col :: Reference to the column being svaed.
       * @param columnName :: Name of the nexus data set in which the column values are saved.
       */
-    template<typename T>
+    template<typename ColumnT, typename NexusT>
     void NexusFileIO::writeTableColumn(int type, const std::string& interpret_as, const API::Column& col, const std::string& columnName) const
     {
       const int nRows = static_cast<int>(col.size());
       int dims_array[1] = { nRows };
 
-      T* toNexus = new T[nRows];
+      NexusT* toNexus = new NexusT[nRows];
       for (int ii = 0; ii < nRows; ii++)
-        toNexus[ii] = col.cell<T>(ii);
+        toNexus[ii] = static_cast<NexusT>(col.cell<ColumnT>(ii));
       NXwritedata(columnName.c_str(), type, 1, dims_array, (void *) (toNexus), false);
       delete[] toNexus;
 
@@ -665,31 +665,31 @@ namespace Mantid
 
         if (col->isType<double>())
         {
-          writeTableColumn<double>(NX_FLOAT64,"",*col,str);
+          writeTableColumn<double,double>(NX_FLOAT64,"",*col,str);
         }
         else if (col->isType<float>())
         {
-          writeTableColumn<float>(NX_FLOAT32,"",*col,str);
+          writeTableColumn<float,float>(NX_FLOAT32,"",*col,str);
         }
-        else if (col->isType<int32_t>())
+        else if (col->isType<int>())
         {
-          writeTableColumn<int32_t>(NX_INT32,"",*col,str);
+          writeTableColumn<int,int32_t>(NX_INT32,"",*col,str);
         }
         else if (col->isType<uint32_t>())
         {
-          writeTableColumn<uint32_t>(NX_UINT32,"",*col,str);
+          writeTableColumn<uint32_t,uint32_t>(NX_UINT32,"",*col,str);
         }
         else if (col->isType<int64_t>())
         {
-          writeTableColumn<int64_t>(NX_INT64,"",*col,str);
+          writeTableColumn<int64_t,int64_t>(NX_INT64,"",*col,str);
         }
-        else if (col->isType<uint64_t>())
+        else if (col->isType<size_t>())
         {
-          writeTableColumn<uint64_t>(NX_UINT64,"",*col,str);
+          writeTableColumn<size_t,uint64_t>(NX_UINT64,"",*col,str);
         }
         else if (col->isType<Boolean>())
         {
-          writeTableColumn<bool>(NX_UINT8,"",*col,str);
+          writeTableColumn<bool,bool>(NX_UINT8,"",*col,str);
         }
         else if (col->isType<std::string>())
         {
diff --git a/Code/Mantid/Framework/TestHelpers/src/WorkspaceCreationHelper.cpp b/Code/Mantid/Framework/TestHelpers/src/WorkspaceCreationHelper.cpp
index cc21f32eac0..610b2773de9 100644
--- a/Code/Mantid/Framework/TestHelpers/src/WorkspaceCreationHelper.cpp
+++ b/Code/Mantid/Framework/TestHelpers/src/WorkspaceCreationHelper.cpp
@@ -1235,10 +1235,10 @@ namespace WorkspaceCreationHelper
     if (!targWS->addColumn("int", "DetectorID"))
       throw(std::runtime_error("Can not add column DetectorID"));
     // stores spectra index which corresponds to a valid detector index;
-    if (!targWS->addColumn("ulong64", "detIDMap"))
+    if (!targWS->addColumn("size_t", "detIDMap"))
       throw(std::runtime_error("Can not add column detIDMap"));
     // stores detector index which corresponds to the workspace index;
-    if (!targWS->addColumn("ulong64", "spec2detMap"))
+    if (!targWS->addColumn("size_t", "spec2detMap"))
       throw(std::runtime_error("Can not add column spec2detMap"));
 
     // will see about that
@@ -1282,9 +1282,9 @@ namespace WorkspaceCreationHelper
     targWS->logs()->addProperty<double>("Ei", Ei, true); //"Incident energy for Direct or Analysis energy for indirect instrument");
 
     // get access to the workspace memory
-    auto &sp2detMap = targWS->getColVector<uint64_t>("spec2detMap");
+    auto &sp2detMap = targWS->getColVector<size_t>("spec2detMap");
     auto &detId = targWS->getColVector<int32_t>("DetectorID");
-    auto &detIDMap = targWS->getColVector<uint64_t>("detIDMap");
+    auto &detIDMap = targWS->getColVector<size_t>("detIDMap");
     auto &L2 = targWS->getColVector<double>("L2");
     auto &TwoTheta = targWS->getColVector<double>("TwoTheta");
     auto &Azimuthal = targWS->getColVector<double>("Azimuthal");
@@ -1296,9 +1296,9 @@ namespace WorkspaceCreationHelper
     uint32_t liveDetectorsCount(0);
     for (size_t i = 0; i < nHist; i++)
     {
-      sp2detMap[i] = std::numeric_limits<uint64_t>::quiet_NaN();
+      sp2detMap[i] = std::numeric_limits<size_t>::quiet_NaN();
       detId[i] = std::numeric_limits<int32_t>::quiet_NaN();
-      detIDMap[i] = std::numeric_limits<uint64_t>::quiet_NaN();
+      detIDMap[i] = std::numeric_limits<size_t>::quiet_NaN();
       L2[i] = std::numeric_limits<double>::quiet_NaN();
       TwoTheta[i] = std::numeric_limits<double>::quiet_NaN();
       Azimuthal[i] = std::numeric_limits<double>::quiet_NaN();
diff --git a/Test/AutoTestData/SavedTableWorkspace.nxs b/Test/AutoTestData/SavedTableWorkspace.nxs
index b5070b0db3e01109818c8b6f1d44841d819781a8..5738b10a9ae072fa2797c1b4a2179093ac063604 100644
GIT binary patch
delta 337
zcmZ3mka596#to4y0!AT*2397fR)%KU1_o9J29pED<TrP)>|tTHnNd4=zsvN^_c$Y%
zxr`KG$|gJT9zx}cZdT;0W(BF=JYSfX5zJUGA_`#~7u5wDwfVc`ULLTS{F=R!@96MM
z4p5(h!f(*%0c+*gR0V6D%&%EId6m{7uwcG6D-&4te7%{I1@s^)=j+)*EV-{gml>?A
z-uNyjSXsQSF_I%U&#{$&X#ekbc5;h@1H>rdiIX>2C~U59bb;vJ?-Gho^~4>fYVzh?
b9<RVEfZ?%lvxn~%h^_zqAfBB(Uw9$_@@{sh

delta 337
zcmZ3mka596#to4y0)`=m##Y8=RwhQ;1_o9J29pED<TrP)>|tSkl~*%)zsvN^_c$Y%
zxeOIx$|gJT9zx}cZdT;0W(BF=JYSfX5zJUGA_`#~7u5wDwfVc`ULLTS{F=R!@96MM
z4p5(h!f(*%0c+*gR0V6D%&%EId6m{7uwcG6D-&4te7%{I1@s^)=j+)*EV-{gml>?A
z-uNyjSXsQSF_I%U&#{$&X#ekbc5;h@1H>rdiIX>2C~U59bb;vJ?-Gho^~4>fYVzh?
b9<RVEfZ?%lvxn~%h^_zqAfBB(Uw9$_edU62

-- 
GitLab