Skip to content

Commit

Permalink
Re #10123. Missed some size_t references in table columns.
Browse files Browse the repository at this point in the history
  • Loading branch information
mantid-roman committed Dec 2, 2014
1 parent a7d1ae5 commit 824c2ca
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
Expand Up @@ -153,7 +153,7 @@ namespace Mantid

//
long nHist =static_cast<long>(inWS->getNumberHistograms());
auto detIDMap = WSDescription.m_PreprDetTable->getColVector<size_t>("detIDMap");
auto detIDMap = WSDescription.m_PreprDetTable->getColVector<uint64_t>("detIDMap");

// vector to place transformed coordinates;
std::vector<coord_t> locCoord(nDims);
Expand Down
Expand Up @@ -170,9 +170,9 @@ namespace Mantid
targWS->logs()->addProperty<bool>("FakeDetectors",false,true);

// get access to the workspace memory
auto &sp2detMap = targWS->getColVector<size_t>("spec2detMap");
auto &sp2detMap = targWS->getColVector<uint64_t>("spec2detMap");
auto &detId = targWS->getColVector<int32_t>("DetectorID");
auto &detIDMap = targWS->getColVector<size_t>("detIDMap");
auto &detIDMap = targWS->getColVector<uint64_t>("detIDMap");
auto &L2 = targWS->getColVector<double>("L2");
auto &TwoTheta = targWS->getColVector<double>("TwoTheta");
auto &Azimuthal = targWS->getColVector<double>("Azimuthal");
Expand Down Expand Up @@ -200,9 +200,9 @@ namespace Mantid
uint32_t liveDetectorsCount(0);
for (size_t i = 0; i < nHist; i++)
{
sp2detMap[i]=std::numeric_limits<size_t>::quiet_NaN();
sp2detMap[i]=std::numeric_limits<uint64_t>::quiet_NaN();
detId[i] =std::numeric_limits<int32_t>::quiet_NaN();
detIDMap[i] =std::numeric_limits<size_t>::quiet_NaN();
detIDMap[i] =std::numeric_limits<uint64_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();
Expand Down Expand Up @@ -332,9 +332,9 @@ namespace Mantid


// get access to the workspace memory
auto &sp2detMap = targWS->getColVector<size_t>("spec2detMap");
auto &sp2detMap = targWS->getColVector<uint64_t>("spec2detMap");
auto &detId = targWS->getColVector<int32_t>("DetectorID");
auto &detIDMap = targWS->getColVector<size_t>("detIDMap");
auto &detIDMap = targWS->getColVector<uint64_t>("detIDMap");
auto &L2 = targWS->getColVector<double>("L2");
auto &TwoTheta = targWS->getColVector<double>("TwoTheta");
auto &Azimuthal = targWS->getColVector<double>("Azimuthal");
Expand Down
Expand Up @@ -61,7 +61,7 @@ void testPreprocessDetectors()

size_t nVal = tws->rowCount();

const std::vector<size_t> & spec2detMap = tws->getColVector<size_t>("spec2detMap");
const std::vector<size_t> & spec2detMap = tws->getColVector<uint64_t>("spec2detMap");
for(size_t i=0;i<nVal;i++)
{
TS_ASSERT_EQUALS(i,spec2detMap[i]);
Expand Down Expand Up @@ -90,9 +90,9 @@ void testFakeDetectors()

size_t nVal = tws->rowCount();

auto & spec2detMap = tws->getColVector<size_t>("spec2detMap");
auto & spec2detMap = tws->getColVector<uint64_t>("spec2detMap");
auto & detId = tws->getColVector<int32_t>("DetectorID");
auto &detIDMap = tws->getColVector<size_t>("detIDMap");
auto &detIDMap = tws->getColVector<uint64_t>("detIDMap");
auto &L2 = tws->getColVector<double>("L2");
auto &TwoTheta = tws->getColVector<double>("TwoTheta");
auto &Azimuthal = tws->getColVector<double>("Azimuthal");
Expand Down
4 changes: 2 additions & 2 deletions Code/Mantid/Framework/MDEvents/src/ConvToMDBase.cpp
Expand Up @@ -28,8 +28,8 @@ 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<size_t>("detIDMap");
m_detID = WSD.m_PreprDetTable->getColVector<int32_t>("DetectorID");
m_detIDMap = WSD.m_PreprDetTable->getColVector<uint64_t>("detIDMap");
m_detID = WSD.m_PreprDetTable->getColVector<int>("DetectorID");



Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/MDEvents/test/MDTransfModQTest.h
Expand Up @@ -84,7 +84,7 @@ class MDTransfModQTest : public CxxTest::TestSuite
double signal(1),errorSq(1);
unsigned int nDims = WSDescr.nDimensions();

auto detIDMap = WSDescr.m_PreprDetTable->getColVector<size_t>("detIDMap");
auto detIDMap = WSDescr.m_PreprDetTable->getColVector<uint64_t>("detIDMap");

std::vector<coord_t> locCoord(nDims);
std::vector<coord_t> minCoord(nDims,FLT_MAX);
Expand Down
Expand Up @@ -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<size_t>("spec2detMap");
auto &sp2detMap = targWS->getColVector<uint64_t>("spec2detMap");
auto &detId = targWS->getColVector<int32_t>("DetectorID");
auto &detIDMap = targWS->getColVector<size_t>("detIDMap");
auto &detIDMap = targWS->getColVector<uint64_t>("detIDMap");
auto &L2 = targWS->getColVector<double>("L2");
auto &TwoTheta = targWS->getColVector<double>("TwoTheta");
auto &Azimuthal = targWS->getColVector<double>("Azimuthal");
Expand All @@ -1296,9 +1296,9 @@ namespace WorkspaceCreationHelper
uint32_t liveDetectorsCount(0);
for (size_t i = 0; i < nHist; i++)
{
sp2detMap[i] = std::numeric_limits<size_t>::quiet_NaN();
sp2detMap[i] = std::numeric_limits<uint64_t>::quiet_NaN();
detId[i] = std::numeric_limits<int32_t>::quiet_NaN();
detIDMap[i] = std::numeric_limits<size_t>::quiet_NaN();
detIDMap[i] = std::numeric_limits<uint64_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();
Expand Down

0 comments on commit 824c2ca

Please sign in to comment.