Skip to content

Commit

Permalink
refs #6449 Disabled NeXus loader attempting to identify Unix lock
Browse files Browse the repository at this point in the history
  • Loading branch information
abuts committed Apr 9, 2013
1 parent dfb8018 commit e376222
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 49 deletions.
76 changes: 38 additions & 38 deletions Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDBoxSaveable.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,38 @@

namespace Mantid
{
namespace MDEvents
{
namespace MDEvents
{

//===============================================================================================
/** Two classes responsible for implementing methods which automatically save/load MDBox in conjuction with
DiskBuffer
One class responsible for saving events into nexus and another one -- for identifying the data positions in a file in conjuction with DB
//===============================================================================================
/** Two classes responsible for implementing methods which automatically save/load MDBox in conjuction with
DiskBuffer
One class responsible for saving events into nexus and another one -- for identifying the data positions in a file in conjuction with DB
@date March 15, 2013
@date March 15, 2013
Copyright © 2008-2010 ISIS Rutherford Appleton Laboratory & NScD Oak Ridge National Laboratory
Copyright © 2008-2010 ISIS Rutherford Appleton Laboratory & NScD Oak Ridge National Laboratory
This file is part of Mantid.
This file is part of Mantid.
Mantid is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
Mantid is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
Mantid is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Mantid is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
File change history is stored at: <https://github.com/mantidproject/mantid>.
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class DLLExport MDBoxSaveable : public Kernel::ISaveable
{
File change history is stored at: <https://github.com/mantidproject/mantid>.
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class DLLExport MDBoxSaveable : public Kernel::ISaveable
{
public:
MDBoxSaveable(API::IMDNode *const);

Expand All @@ -50,24 +50,24 @@ namespace MDEvents
virtual void flushData()const;
/// remove objects data from memory but keep all averages
virtual void clearDataFromMemory()
{m_MDNode->clearDataFromMemory();}

/// @return the amount of memory that the object takes up in the MRU.
virtual uint64_t getTotalDataSize() const
{ return m_MDNode->getTotalDataSize(); }
/**@return the size of the event vector. ! Note that this is NOT necessarily the same as the number of points
(because it might be cached to disk) or the size on disk (because you might have called AddEvents) */
virtual size_t getDataMemorySize()const
{ return m_MDNode->getDataInMemorySize();}

~MDBoxSaveable(){}
{ m_MDNode->clearDataFromMemory();}


/// @return the amount of memory that the object takes up in the MRU.
virtual uint64_t getTotalDataSize() const
{ return m_MDNode->getTotalDataSize(); }
/**@return the size of the event vector. ! Note that this is NOT necessarily the same as the number of points
(because it might be cached to disk) or the size on disk (because you might have called AddEvents) */
virtual size_t getDataMemorySize()const
{ return m_MDNode->getDataInMemorySize();}

~MDBoxSaveable(){}
private:
API::IMDNode *const m_MDNode;
};
};


}
}
}

#endif
22 changes: 11 additions & 11 deletions Code/Mantid/Framework/MDEvents/test/MDBoxSaveableTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ static void destroySuite(MDBoxSaveableTest * suite) { delete suite; }

//-----------------------------------------------------------------------------------------
/** Can we load it back? */
void test_loadDirectNexus()
void xest_loadDirectNexus()
{
// A box to load stuff from
MDBox<MDLeanEvent<3>,3> c(sc.get());
Expand Down Expand Up @@ -193,7 +193,7 @@ static void destroySuite(MDBoxSaveableTest * suite) { delete suite; }

//-----------------------------------------------------------------------------------------
/** What if the box has no events, does it crash? */
void xest_SetFileBacked_fileEvents()
void test_SetFileBacked_fileEvents()
{
// A box to load stuff from
MDBox<MDLeanEvent<3>,3> c(sc.get());
Expand Down Expand Up @@ -225,7 +225,7 @@ static void destroySuite(MDBoxSaveableTest * suite) { delete suite; }
}
/** Test splitting of a MDBox into a MDGridBox when the
* original box is backed by a file. */
void test_fileBackEnd_construction()
void xest_fileBackEnd_construction()
{
// Create a box with a controller for the back-end
BoxController_sptr bc(new BoxController(3));
Expand Down Expand Up @@ -280,7 +280,7 @@ static void destroySuite(MDBoxSaveableTest * suite) { delete suite; }
/** If a MDBox is file-backed, test that
* you can add events to it without having to load the data from disk.
*/
void xest_fileBackEnd_addEvent()
void test_fileBackEnd_addEvent()
{
// Create a box with a controller for the back-end
BoxController_sptr bc(new BoxController(3));
Expand Down Expand Up @@ -440,7 +440,7 @@ static void destroySuite(MDBoxSaveableTest * suite) { delete suite; }

//-----------------------------------------------------------------------------------------
/** Set up the file back end and xest accessing data */
void test_fileBackEnd()
void xest_fileBackEnd()
{
// Create a box with a controller for the back-end
BoxController_sptr bc(new BoxController(3));
Expand Down Expand Up @@ -503,7 +503,7 @@ static void destroySuite(MDBoxSaveableTest * suite) { delete suite; }
//-----------------------------------------------------------------------------------------
/** Set up the file back end and test accessing data
* in a non-const way, and writing it back out*/
void test_fileBackEnd_nonConst_access()
void xest_fileBackEnd_nonConst_access()
{
// Create a box with a controller for the back-end
BoxController_sptr bc(new BoxController(3));
Expand Down Expand Up @@ -561,7 +561,7 @@ static void destroySuite(MDBoxSaveableTest * suite) { delete suite; }
//-----------------------------------------------------------------------------------------
/** Set up the file back end and xest accessing data
* where the number of events in the box is reduced or increased. */
void test_fileBackEnd_nonConst_EventListChangesSize()
void xest_fileBackEnd_nonConst_EventListChangesSize()
{
// Create a box with a controller for the back-end
BoxController_sptr bc(new BoxController(3));
Expand Down Expand Up @@ -718,13 +718,13 @@ static void destroySuite(MDBoxSaveableTest * suite) { delete suite; }
do_deleteNexusFile("MDBoxBinningxest.nxs");
}

void test_fileBackEnd_binningOperations()
void xest_fileBackEnd_binningOperations()
{
do_test_fileBackEnd_binningOperations(false);
}

// TODO : does not work multithreaded and have never been workging. -- to fix
void xest_fileBackEnd_binningOperations_inParallel()
void xxest_fileBackEnd_binningOperations_inParallel()
{
do_test_fileBackEnd_binningOperations(true);
}
Expand All @@ -735,7 +735,7 @@ static void destroySuite(MDBoxSaveableTest * suite) { delete suite; }
* for a workspace that is backed by a file (and thus tries to stay below
* a certain amount of memory used).
*/
void test_splitAllIfNeeded_fileBacked()
void xest_splitAllIfNeeded_fileBacked()
{
typedef MDLeanEvent<2> MDE;

Expand Down Expand Up @@ -825,7 +825,7 @@ static void destroySuite(MDBoxSaveableTest * suite) { delete suite; }
// //-----------------------------------------------------------------------------------------
// /** Set up the file back end and test accessing data.
// * This time, use no DiskBuffer so that reading/loading is done within the object itself */
// void xest_fileBackEnd_noMRU()
// void xxest_fileBackEnd_noMRU()
// {
// // Create a box with a controller for the back-end
// BoxController_sptr bc(new BoxController(3));
Expand Down

0 comments on commit e376222

Please sign in to comment.