Skip to content
Snippets Groups Projects
Commit 41246f0f authored by Janik Zikovsky's avatar Janik Zikovsky
Browse files

Refs #3724: Renamed 2 algorithms so their source files match their algorithm names

parent 5197d9a4
No related merge requests found
......@@ -90,7 +90,7 @@ if __name__ == "__main__":
parser.add_argument('subproject', metavar='SUBPROJECT', type=str,
help='The subproject under Framework/; e.g. Kernel')
parser.add_argument('classname', metavar='CLASSNAME', type=str,
help='Name of the class to create')
help='Name of the class to move')
parser.add_argument('newproject', metavar='NEWPROJECT', type=str,
help='Name of the project to which to move the class.')
parser.add_argument('newclassname', metavar='NEWCLASSNAME', type=str,
......
......@@ -4,6 +4,7 @@ set ( SRC_FILES
src/AddLogDerivative.cpp
src/AddSampleLog.cpp
src/AlignDetectors.cpp
src/AlphaCalc.cpp
src/AnyShapeAbsorption.cpp
src/ApplyDetailedBalance.cpp
src/ApplyTransmissionCorrection.cpp
......@@ -100,10 +101,9 @@ set ( SRC_FILES
src/MergeRuns.cpp
src/Minus.cpp
src/MonteCarloAbsorption.cpp
src/MultipleScatteringAbsorption.cpp
src/MultipleScatteringCylinderAbsorption.cpp
src/Multiply.cpp
src/MultiplyRange.cpp
src/MuonAlphaCalc.cpp
src/MuonAsymmetryCalc.cpp
src/MuonRemoveExpDecay.cpp
src/NormaliseByCurrent.cpp
......@@ -170,6 +170,7 @@ set ( INC_FILES
inc/MantidAlgorithms/AddLogDerivative.h
inc/MantidAlgorithms/AddSampleLog.h
inc/MantidAlgorithms/AlignDetectors.h
inc/MantidAlgorithms/AlphaCalc.h
inc/MantidAlgorithms/AnyShapeAbsorption.h
inc/MantidAlgorithms/ApplyDetailedBalance.h
inc/MantidAlgorithms/ApplyTransmissionCorrection.h
......@@ -267,10 +268,9 @@ set ( INC_FILES
inc/MantidAlgorithms/MergeRuns.h
inc/MantidAlgorithms/Minus.h
inc/MantidAlgorithms/MonteCarloAbsorption.h
inc/MantidAlgorithms/MultipleScatteringAbsorption.h
inc/MantidAlgorithms/MultipleScatteringCylinderAbsorption.h
inc/MantidAlgorithms/Multiply.h
inc/MantidAlgorithms/MultiplyRange.h
inc/MantidAlgorithms/MuonAlphaCalc.h
inc/MantidAlgorithms/MuonAsymmetryCalc.h
inc/MantidAlgorithms/MuonRemoveExpDecay.h
inc/MantidAlgorithms/NormaliseByCurrent.h
......@@ -335,6 +335,7 @@ set ( TEST_FILES
test/AddLogDerivativeTest.h
test/AddSampleLogTest.h
test/AlignDetectorsTest.h
test/AlphaCalcTest.h
test/AnyShapeAbsorptionTest.h
test/ApplyDetailedBalanceTest.h
test/ApplyTransmissionCorrectionTest.h
......@@ -421,10 +422,9 @@ set ( TEST_FILES
test/MergeRunsTest.h
test/MinusTest.h
test/MonteCarloAbsorptionTest.h
test/MultipleScatteringAbsorptionTest.h
test/MultipleScatteringCylinderAbsorptionTest.h
test/MultiplyRangeTest.h
test/MultiplyTest.h
test/MuonAlphaCalcTest.h
test/MuonAsymmetryCalcTest.h
test/MuonRemoveExpDecayTest.h
test/NormaliseByCurrentTest.h
......
......@@ -46,13 +46,13 @@ namespace Mantid
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 MuonAlphaCalc : public API::Algorithm
class DLLExport AlphaCalc : public API::Algorithm
{
public:
/// Default constructor
MuonAlphaCalc() : API::Algorithm() {};
AlphaCalc() : API::Algorithm() {};
/// Destructor
virtual ~MuonAlphaCalc() {};
virtual ~AlphaCalc() {};
/// Algorithm's name for identification overriding a virtual method
virtual const std::string name() const { return "AlphaCalc";}
/// Algorithm's version for identification overriding a virtual method
......
......@@ -42,15 +42,15 @@ namespace Algorithms
<https://svn.mantidproject.org/mantid/trunk/Code/Mantid>
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class DLLExport MultipleScatteringAbsorption : public API::Algorithm
class DLLExport MultipleScatteringCylinderAbsorption : public API::Algorithm
{
public:
/// Default constructor
MultipleScatteringAbsorption() : API::Algorithm() {};
MultipleScatteringCylinderAbsorption() : API::Algorithm() {};
/// Destructor
virtual ~MultipleScatteringAbsorption() {};
virtual ~MultipleScatteringCylinderAbsorption() {};
/// Algorithm's name for identification overriding a virtual method
virtual const std::string name() const { return "MultipleScatteringCylinderAbsorption";}
......@@ -76,7 +76,7 @@ private:
// Wavelength function
double wavelength( double path_length_m, double tof_us );
/** MultipleScatteringAbsorption correction calculation. This
/** MultipleScatteringCylinderAbsorption correction calculation. This
* method will change the values in the y_val array to correct for
* multiple scattering absorption.
*
......
......@@ -5,7 +5,7 @@
#include <vector>
#include "MantidKernel/ArrayProperty.h"
#include "MantidAlgorithms/MuonAlphaCalc.h"
#include "MantidAlgorithms/AlphaCalc.h"
namespace Mantid
{
......@@ -16,12 +16,12 @@ using namespace Kernel;
using API::Progress;
// Register the class into the algorithm factory
DECLARE_ALGORITHM( MuonAlphaCalc)
DECLARE_ALGORITHM( AlphaCalc)
/** Initialisation method. Declares properties to be used in algorithm.
*
*/
void MuonAlphaCalc::init()
void AlphaCalc::init()
{
declareProperty(new API::WorkspaceProperty<>("InputWorkspace", "",
Direction::Input), "Name of the input workspace");
......@@ -45,7 +45,7 @@ void MuonAlphaCalc::init()
/** Executes the algorithm
*
*/
void MuonAlphaCalc::exec()
void AlphaCalc::exec()
{
std::vector<int> forwardSpectraList = getProperty("ForwardSpectra");
std::vector<int> backwardSpectraList = getProperty("BackwardSpectra");
......
//----------------------------------------------------------------------
// Includes
//----------------------------------------------------------------------
#include "MantidAlgorithms/MultipleScatteringAbsorption.h"
#include "MantidAlgorithms/MultipleScatteringCylinderAbsorption.h"
#include "MantidAPI/WorkspaceValidators.h"
#include "MantidKernel/Exception.h"
#include "MantidKernel/PhysicalConstants.h"
......@@ -13,7 +13,7 @@ namespace Mantid
{
namespace Algorithms
{
DECLARE_ALGORITHM(MultipleScatteringAbsorption) // Register the class into the algorithm factory
DECLARE_ALGORITHM(MultipleScatteringCylinderAbsorption) // Register the class into the algorithm factory
using namespace Kernel;
using namespace API;
......@@ -57,7 +57,7 @@ using std::vector;
/**
* Initialize the properties to default values
*/
void MultipleScatteringAbsorption::init()
void MultipleScatteringCylinderAbsorption::init()
{
declareProperty(new WorkspaceProperty<API::MatrixWorkspace>("InputWorkspace",
"",Direction::Input, new InstrumentValidator<>), "The name of the input workspace.");
......@@ -74,7 +74,7 @@ void MultipleScatteringAbsorption::init()
/**
* Execute the algorithm
*/
void MultipleScatteringAbsorption::exec()
void MultipleScatteringCylinderAbsorption::exec()
{
// common information
API::MatrixWorkspace_sptr in_WS = getProperty("InputWorkspace");
......@@ -127,7 +127,7 @@ void MultipleScatteringAbsorption::exec()
/**
* Set up the Z table for the specified two theta angle (in degrees).
*/
void MultipleScatteringAbsorption::ZSet(const double angle_rad, vector<double>& Z)
void MultipleScatteringCylinderAbsorption::ZSet(const double angle_rad, vector<double>& Z)
{
double theta_rad = angle_rad * .5;
int l, J;
......@@ -160,7 +160,7 @@ void MultipleScatteringAbsorption::ZSet(const double angle_rad, vector<double>&
/**
* Evaluate the AttFac function for a given sigir and sigsr.
*/
double MultipleScatteringAbsorption::AttFac(const double sigir, const double sigsr,
double MultipleScatteringCylinderAbsorption::AttFac(const double sigir, const double sigsr,
const vector<double>& Z)
{
double facti = 1.0;
......@@ -188,7 +188,7 @@ double MultipleScatteringAbsorption::AttFac(const double sigir, const double sig
* Calculate the wavelength at a specified total path in meters and
* time-of-flight in microseconds.
*/
inline double MultipleScatteringAbsorption::wavelength( double path_length_m, double tof_us )
inline double MultipleScatteringCylinderAbsorption::wavelength( double path_length_m, double tof_us )
{
return ANGST_PER_US_PER_M * tof_us / path_length_m;
}
......@@ -198,7 +198,7 @@ inline double MultipleScatteringAbsorption::wavelength( double path_length_m, do
* Alter the values in the y_vals[] to account for multiple scattering.
* Parameter total_path is in meters, and the sample radius is in cm.
*/
void MultipleScatteringAbsorption::apply_msa_correction(
void MultipleScatteringCylinderAbsorption::apply_msa_correction(
double total_path, double angle_deg, double radius,
double coeff1, double coeff2, double coeff3,
vector<double>& tof, vector<double>& y_val)
......
......@@ -7,7 +7,7 @@
#include "MantidDataHandling/LoadInstrument.h"
#include "MantidDataHandling/GroupDetectors.h"
#include "MantidAPI/IAlgorithm.h"
#include "MantidAlgorithms/MuonAlphaCalc.h"
#include "MantidAlgorithms/AlphaCalc.h"
#include "MantidAPI/Workspace.h"
#include "MantidDataObjects/Workspace2D.h"
#include "MantidAPI/AnalysisDataService.h"
......@@ -16,7 +16,7 @@
using namespace Mantid::Algorithms;
using namespace Mantid::API;
class MuonAlphaCalcTest : public CxxTest::TestSuite
class AlphaCalcTest : public CxxTest::TestSuite
{
public:
......@@ -92,7 +92,7 @@ public:
private:
MuonAlphaCalc alphaCalc;
AlphaCalc alphaCalc;
Mantid::DataHandling::LoadMuonNexus loader;
};
......
......@@ -4,7 +4,7 @@
#include <cxxtest/TestSuite.h>
#include <vector>
#include "MantidAlgorithms/MultipleScatteringAbsorption.h"
#include "MantidAlgorithms/MultipleScatteringCylinderAbsorption.h"
#include "MantidAPI/AnalysisDataService.h"
#include "MantidTestHelpers/WorkspaceCreationHelper.h"
#include "MantidTestHelpers/ComponentCreationHelper.h"
......@@ -16,7 +16,7 @@ using namespace Mantid::Kernel;
using Mantid::DataObjects::Workspace2D_sptr;
using Mantid::MantidVec;
class MultipleScatteringAbsorptionTest : public CxxTest::TestSuite
class MultipleScatteringCylinderAbsorptionTest : public CxxTest::TestSuite
{
public:
void testName()
......@@ -36,7 +36,7 @@ public:
void testInit()
{
Mantid::Algorithms::MultipleScatteringAbsorption algorithm_b;
Mantid::Algorithms::MultipleScatteringCylinderAbsorption algorithm_b;
TS_ASSERT_THROWS_NOTHING( algorithm_b.initialize() );
TS_ASSERT( algorithm_b.isInitialized() );
......@@ -78,7 +78,7 @@ public:
AnalysisDataService::Instance().add("TestInputWS",wksp);
// create and execute the algorithm
Mantid::Algorithms::MultipleScatteringAbsorption algorithm_c;
Mantid::Algorithms::MultipleScatteringCylinderAbsorption algorithm_c;
TS_ASSERT_THROWS_NOTHING(algorithm_c.initialize() );
TS_ASSERT( algorithm_c.isInitialized() );
......@@ -130,7 +130,7 @@ public:
}
private:
Mantid::Algorithms::MultipleScatteringAbsorption algorithm;
Mantid::Algorithms::MultipleScatteringCylinderAbsorption algorithm;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment