Skip to content

Commit

Permalink
refs #6362 Redefined nexus writer and enabled couple of tests
Browse files Browse the repository at this point in the history
, failing earlier
  • Loading branch information
abuts committed Jan 22, 2013
1 parent 14b545d commit c6c5ce2
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Code/Mantid/Framework/MDAlgorithms/src/SaveMD.cpp
Expand Up @@ -328,11 +328,11 @@ namespace MDAlgorithms
MDBox<MDE,nd> * mdBox = dynamic_cast<MDBox<MDE,nd> *>(Box);
if(!mdBox) throw std::runtime_error("found unfamiliar type of box");
// Store the index
uint64_t nEvents = mdBox->getNPoints();

box_event_index[id*2] = mdBox->getFilePosition();
box_event_index[id*2+1] = nEvents;
box_event_index[id*2+1] = mdBox->getNPoints();
// save for the first time
if(!update && nEvents>0)mdBox->saveNexus(file);
if(!update && (box_event_index[id*2] != std::numeric_limits<uint64_t>::max()))mdBox->saveNexus(file);
// set that it is on disk and clear the actual events to free up memory, saving occured earlier
if (MakeFileBacked) mdBox->clearDataFromMemory();

Expand Down
Expand Up @@ -178,9 +178,9 @@ class CreateMDWorkspaceTest : public CxxTest::TestSuite
do_test_exec("", true);
}

void xest_exec_MDLeanEvent_fileBacked()
void test_exec_MDLeanEvent_fileBacked()
{
//do_test_exec("CreateMDWorkspaceTest.nxs", true);
do_test_exec("CreateMDWorkspaceTest.nxs", true);
}


Expand Down
4 changes: 2 additions & 2 deletions Code/Mantid/Framework/MDAlgorithms/test/SaveMDTest.h
Expand Up @@ -51,9 +51,9 @@ class SaveMDTest : public CxxTest::TestSuite
do_test_exec(23, "SaveMDTest.nxs");
}

void xest_exec_noEvents()
void test_exec_noEvents()
{
// do_test_exec(0, "SaveMDTest_noEvents.nxs");
do_test_exec(0, "SaveMDTest_noEvents.nxs");
}

void test_MakeFileBacked()
Expand Down
Expand Up @@ -237,6 +237,7 @@ namespace MDEvents
signal_t & totalSignal, signal_t & totalErrorSquared)
{
size_t numEvents = events.size();
if(numEvemts==0)return;
size_t numColumns = nd+4;
coord_t * data = new coord_t[numEvents*numColumns];

Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/MDEvents/test/MDGridBoxTest.h
Expand Up @@ -1026,7 +1026,7 @@ class MDGridBoxTest : public CxxTest::TestSuite

// Split those boxes in parallel.
ThreadSchedulerFIFO * ts = new ThreadSchedulerFIFO();
ThreadPool tp(ts);
ThreadPool tp(ts,2);
b->splitAllIfNeeded(ts);
tp.joinAll();

Expand Down

0 comments on commit c6c5ce2

Please sign in to comment.