Skip to content

Commit

Permalink
refs #5552 fixing merging error
Browse files Browse the repository at this point in the history
  • Loading branch information
abuts committed Aug 4, 2012
1 parent 43f299d commit 69d5b4b
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 52 deletions.
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/MDAlgorithms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ set ( TEST_FILES
test/WeightedMeanMDTest.h
test/XorMDTest.h
# Old TMD convertToMD code prepared for deprication:
test/ConvertToMDEventsUnitsConvTest.h
# test/ConvertToMDEventsUnitsConvTest.h
)

set ( GMOCK_TEST_FILES
Expand Down
1 change: 0 additions & 1 deletion Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDBox.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "MantidGeometry/MDGeometry/MDDimensionExtents.h"
#include "MantidKernel/MultiThreaded.h"
#include "MantidKernel/System.h"
#include "MantidAPI/BoxController.h"
#include "MantidMDEvents/MDBoxBase.h"
#include "MantidMDEvents/MDDimensionStats.h"
#include "MantidMDEvents/MDLeanEvent.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "MantidKernel/ISaveable.h"
#include "MantidKernel/System.h"
#include "MantidAPI/BoxController.h"
//#include "MantidMDEvents/BoxCtrlChangesList.h"
#include "MantidAPI/CoordTransform.h"
#include "MantidMDEvents/MDBin.h"
#include "MantidMDEvents/MDLeanEvent.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ namespace Mantid
{
public:
MDBoxToChange():m_ParentGridBox(NULL),m_Index(std::numeric_limits<size_t>::max()-1){};

size_t getIndex()const{return m_Index;}

MDGridBox<MDE,nd>* getParent()const{return m_ParentGridBox;}

// Below for the time being:
Expand All @@ -58,9 +60,10 @@ namespace Mantid
*/
bool isFull(size_t maxSize=1000)
{
/**stub */
return true;
}
/**DESCRIBE */
/**constructor */
MDBoxToChange(MDBox<MDE,nd> *box,size_t Index)
{
m_Index = Index;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "MantidKernel/System.h"
#include "MantidKernel/Task.h"
#include "MantidKernel/ThreadScheduler.h"
#include "MantidAPI/BoxController.h"
#include "MantidMDEvents/MDBoxBase.h"
#include "MantidMDEvents/MDBox.h"
#include "MantidMDEvents/MDLeanEvent.h"
Expand Down
50 changes: 2 additions & 48 deletions Code/Mantid/Framework/MDEvents/src/MDBoxToChange.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,58 +8,12 @@ namespace MDEvents

//template<typename MDE,size_t nd>
//MDBoxToChange<MDE,nd>::MDBoxToChange(MDBox<MDE,nd> *box,size_t Index)
//{
// m_Index = Index;
// MDGridBox<MDE, nd> * parent = dynamic_cast<MDGridBox<MDE, nd> * >(box->getParent());
// if(parent)
// {
// m_ParentGridBox=parent;
// }
// else //HACK! if not parent, it is probably root a box -> such type should be created but meanwhile;
// {
// m_ParentGridBox=reinterpret_cast<MDGridBox<MDE,nd> *>(box);
// m_Index = std::numeric_limits<size_t>::max();
// }

//}



//template<typename MDE,size_t nd>
//MDGridBox<MDE,nd>* MDBoxToChange<MDE,nd>::splitToGridBox()
//{
// MDBox<MDE, nd> *pMDBox;
// bool rootBox(false);
// // get the actual box to split:
// if(m_Index==std::numeric_limits<size_t>::max())
// {
// rootBox = true;
// pMDBox = reinterpret_cast<MDBox<MDE,nd>*>(m_ParentGridBox);
// }
// else pMDBox = dynamic_cast<MDBox<MDE,nd>*>(m_ParentGridBox->getChild(m_Index));


// // Construct the grid instead of box. This should take the object out of the disk MRU
// MDGridBox<MDE, nd> * gridbox = new MDGridBox<MDE, nd>(pMDBox);
// // Track how many MDBoxes there are in the overall workspace
// pMDBox->getBoxController()->trackNumBoxes(pMDBox->getDepth());


// if(rootBox) // carefull -- root pointer is not redefined here!
// {
// // this makes workspace data pointer invalid, but the actual pointer will remain dangling so care should be taken not to dereference it
// delete pMDBox;
// m_ParentGridBox = gridbox;
// }
// else
// { // this will delete the old box and set new gridBox instead
// m_ParentGridBox->setChild(m_Index,gridbox);
// }
//// make this grid box undefined again
// m_Index=std::numeric_limits<size_t>::max()-1;

// return gridbox;
//}


///**convert input box into MDGridBox and split MDGrid box into its children
// *
// * @param pointer to MDBox;
Expand Down

0 comments on commit 69d5b4b

Please sign in to comment.