Skip to content

Commit

Permalink
Rename algorithm name to MaskBinsFromTable. Refs #5450.
Browse files Browse the repository at this point in the history
  • Loading branch information
wdzhou committed Jun 5, 2012
1 parent 32046d8 commit f28ba01
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
6 changes: 3 additions & 3 deletions Code/Mantid/Framework/Algorithms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ set ( SRC_FILES
src/InvertMask.cpp
src/Logarithm.cpp
src/MaskBins.cpp
src/MaskDetectorBins.cpp
src/MaskBinsFromTable.cpp
src/MaskDetectorsIf.cpp
src/Max.cpp
src/MaxMin.cpp
Expand Down Expand Up @@ -317,7 +317,7 @@ set ( INC_FILES
inc/MantidAlgorithms/InvertMask.h
inc/MantidAlgorithms/Logarithm.h
inc/MantidAlgorithms/MaskBins.h
inc/MantidAlgorithms/MaskDetectorBins.h
inc/MantidAlgorithms/MaskBinsFromTable.h
inc/MantidAlgorithms/MaskDetectorsIf.h
inc/MantidAlgorithms/Max.h
inc/MantidAlgorithms/MaxMin.h
Expand Down Expand Up @@ -502,8 +502,8 @@ set ( TEST_FILES
test/InterpolatingRebinTest.h
test/InvertMaskTest.h
test/LogarithmTest.h
test/MaskBinsFromTableTest.h
test/MaskBinsTest.h
test/MaskDetectorBinsTest.h
test/MaxMinTest.h
test/MedianDetectorTestTest.h
test/MergeRunsTest.h
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef MANTID_ALGORITHMS_MASKDETECTORBINS_H_
#define MANTID_ALGORITHMS_MASKDETECTORBINS_H_
#ifndef MANTID_ALGORITHMS_MASKBINSFROMTABLE_H_
#define MANTID_ALGORITHMS_MASKBINSFROMTABLE_H_

#include "MantidKernel/System.h"
#include "MantidAPI/Algorithm.h"
Expand All @@ -10,7 +10,7 @@ namespace Mantid
namespace Algorithms
{

/** MaskDetectorBins : TODO: DESCRIPTION
/** MaskBinsFromTable : TODO: DESCRIPTION
@date 2012-06-04
Expand All @@ -34,14 +34,14 @@ namespace Algorithms
File change history is stored at: <https://svn.mantidproject.org/mantid/trunk/Code/Mantid>
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class DLLExport MaskDetectorBins : public API::Algorithm
class DLLExport MaskBinsFromTable : public API::Algorithm
{
public:
MaskDetectorBins();
virtual ~MaskDetectorBins();
MaskBinsFromTable();
virtual ~MaskBinsFromTable();

/// Algorithm's name for identification overriding a virtual method
virtual const std::string name() const { return "MaskDetectorBins";};
virtual const std::string name() const { return "MaskBinsFromTable";};
/// Algorithm's version for identification overriding a virtual method
virtual int version() const { return 1;};
/// Algorithm's category for identification overriding a virtual method
Expand All @@ -61,4 +61,4 @@ namespace Algorithms
} // namespace Algorithms
} // namespace Mantid

#endif /* MANTID_ALGORITHMS_MASKDETECTORBINS_H_ */
#endif /* MANTID_ALGORITHMS_MASKBINSFROMTABLE_H_ */
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "MantidAlgorithms/MaskDetectorBins.h"
#include "MantidAlgorithms/MaskBinsFromTable.h"
#include "MantidKernel/System.h"
#include "MantidAPI/WorkspaceProperty.h"
#include "MantidAPI/WorkspaceValidators.h"
Expand All @@ -17,24 +17,24 @@ namespace Algorithms
//----------------------------------------------------------------------------------------------
/** Constructor
*/
MaskDetectorBins::MaskDetectorBins()
MaskBinsFromTable::MaskBinsFromTable()
{
}

//----------------------------------------------------------------------------------------------
/** Destructor
*/
MaskDetectorBins::~MaskDetectorBins()
MaskBinsFromTable::~MaskBinsFromTable()
{
}

void MaskDetectorBins::initDocs()
void MaskBinsFromTable::initDocs()
{
this->setWikiSummary("Mask bins from a table workspace. ");
this->setOptionalMessage("Mask bins from a table workspace. ");
}

void MaskDetectorBins::init()
void MaskBinsFromTable::init()
{
this->declareProperty(new WorkspaceProperty<>("InputWorkspace","",Direction::Input, boost::make_shared<HistogramValidator>()),
"Input Workspace to mask bins. ");
Expand All @@ -46,7 +46,7 @@ namespace Algorithms
return;
}

void MaskDetectorBins::exec()
void MaskBinsFromTable::exec()
{
MatrixWorkspace_const_sptr inputWS = getProperty("InputWorkspace");
DataObjects::TableWorkspace_sptr paramWS = getProperty("MaskingInformation");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
#include <iomanip>

#include "MantidTestHelpers/WorkspaceCreationHelper.h"
#include "MantidAlgorithms/MaskDetectorBins.h"
#include "MantidAlgorithms/MaskBinsFromTable.h"
#include "MantidAPI/TableRow.h"

using namespace Mantid;
using namespace Mantid::Algorithms;
using namespace Mantid::API;

class MaskDetectorBinsTest : public CxxTest::TestSuite
class MaskBinsFromTableTest : public CxxTest::TestSuite
{
public:
// This pair of boilerplate methods prevent the suite being created statically
// This means the constructor isn't called when running other tests
static MaskDetectorBinsTest *createSuite() { return new MaskDetectorBinsTest(); }
static void destroySuite( MaskDetectorBinsTest *suite ) { delete suite; }
static MaskBinsFromTableTest *createSuite() { return new MaskBinsFromTableTest(); }
static void destroySuite( MaskBinsFromTableTest *suite ) { delete suite; }

/*
* In-place single mask test.
Expand All @@ -45,7 +45,7 @@ class MaskDetectorBinsTest : public CxxTest::TestSuite
row0 << 3.0 << 6.0 << "1-3";

// 3. Execute
MaskDetectorBins maskalg;
MaskBinsFromTable maskalg;
TS_ASSERT_THROWS_NOTHING(maskalg.initialize());
maskalg.setPropertyValue("InputWorkspace", workspaceName);
maskalg.setPropertyValue("OutputWorkspace",workspaceName);
Expand Down Expand Up @@ -93,7 +93,7 @@ class MaskDetectorBinsTest : public CxxTest::TestSuite
row0 << 3.0 << 6.0 << "1-3";

// 3. Execute
MaskDetectorBins maskalg;
MaskBinsFromTable maskalg;
TS_ASSERT_THROWS_NOTHING(maskalg.initialize());
maskalg.setPropertyValue("InputWorkspace", workspaceName);
maskalg.setPropertyValue("OutputWorkspace",opWSName);
Expand Down Expand Up @@ -148,7 +148,7 @@ class MaskDetectorBinsTest : public CxxTest::TestSuite
row2 << 0.0 << 1.0 << "9";

// 3. Execute
MaskDetectorBins maskalg;
MaskBinsFromTable maskalg;
TS_ASSERT_THROWS_NOTHING(maskalg.initialize());
maskalg.setPropertyValue("InputWorkspace", workspaceName);
maskalg.setPropertyValue("OutputWorkspace",workspaceName);
Expand Down

0 comments on commit f28ba01

Please sign in to comment.