Skip to content

Commit

Permalink
refs #5552 Peak tests have been hopefully fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
abuts committed Aug 4, 2012
1 parent b1994d0 commit 75543ee
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/API/inc/MantidAPI/BoxController.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace API
* @return BoxController instance
*/
BoxController(size_t nd)
:nd(nd), m_maxId(0), m_numSplit(1), m_file(NULL), m_diskBuffer(), m_SplitThreshold(128),m_useWriteBuffer(true)
:nd(nd), m_maxId(0), m_numSplit(1), m_file(NULL), m_diskBuffer(), m_useWriteBuffer(true)
{
// TODO: Smarter ways to determine all of these values
m_maxDepth = 5;
Expand Down
8 changes: 1 addition & 7 deletions Code/Mantid/Framework/MDEvents/src/MDBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ namespace MDEvents
this->m_depth = depth;
// Give it a fresh ID from the controller.
this->setId( splitter->getNextId() );
// reserve the size of data file for future add operations
size_t boxCapacity = splitter->getSplitThreshold();
if (boxCapacity>2)this->data.reserve(boxCapacity-1);
}
}

//-----------------------------------------------------------------------------------------------
/** Constructor
Expand All @@ -63,9 +60,6 @@ namespace MDEvents
this->m_depth = depth;
// Give it a fresh ID from the controller.
this->setId( splitter->getNextId() );
// reserve the size of data file for future add operations
size_t boxCapacity = splitter->getSplitThreshold();
if (boxCapacity>2)this->data.reserve(boxCapacity-1);

}

Expand Down
4 changes: 0 additions & 4 deletions Code/Mantid/Framework/MDEvents/src/MDGridBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -788,10 +788,6 @@ namespace MDEvents
MDBox<MDE, nd> * box = dynamic_cast<MDBox<MDE, nd> *>(boxes[i]);
if (box)
{
if(box->getNPoints()>0)
{
continue;
}
// Plain MD-Box. Does it need to split?
if (this->m_BoxController->willSplit(box->getNPoints(), box->getDepth() ))
{
Expand Down
3 changes: 2 additions & 1 deletion Code/Mantid/Framework/MDEvents/test/FindPeaksMDTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ class FindPeaksMDTest : public CxxTest::TestSuite
TS_ASSERT_DELTA( ws->getPeak(0).getQLabFrame()[2], 5.0, 0.11);
TS_ASSERT_EQUALS(ws->getPeak(0).getRunNumber(), 12345);
// Bin count = density of the box / 1e6
TS_ASSERT_DELTA( ws->getPeak(0).getBinCount(), (histo ? 0.0102 : 0.213623), 0.001);
double BinCount =ws->getPeak(0).getBinCount();
TS_ASSERT_DELTA( BinCount , (histo ? 0.0102 : 0.213623), 0.001);

if (MaxPeaks > 1)
{
Expand Down

0 comments on commit 75543ee

Please sign in to comment.