Skip to content
Snippets Groups Projects
Commit 6613938b authored by Gesner Passos's avatar Gesner Passos
Browse files

Creation of the RingProfile algorithm

just execution of class_maker

re #7776
parent 37523902
No related merge requests found
...@@ -180,6 +180,7 @@ set ( SRC_FILES ...@@ -180,6 +180,7 @@ set ( SRC_FILES
src/ResampleX.cpp src/ResampleX.cpp
src/ResetNegatives.cpp src/ResetNegatives.cpp
src/ResizeRectangularDetector.cpp src/ResizeRectangularDetector.cpp
src/RingProfile.cpp
src/SANSDirectBeamScaling.cpp src/SANSDirectBeamScaling.cpp
src/SassenaFFT.cpp src/SassenaFFT.cpp
src/Scale.cpp src/Scale.cpp
...@@ -189,7 +190,7 @@ set ( SRC_FILES ...@@ -189,7 +190,7 @@ set ( SRC_FILES
src/SignalOverError.cpp src/SignalOverError.cpp
src/SmoothData.cpp src/SmoothData.cpp
src/SmoothNeighbours.cpp src/SmoothNeighbours.cpp
src/SofQCommon.cpp src/SofQCommon.cpp
src/SofQW.cpp src/SofQW.cpp
src/SofQW2.cpp src/SofQW2.cpp
src/SofQW3.cpp src/SofQW3.cpp
...@@ -402,6 +403,7 @@ set ( INC_FILES ...@@ -402,6 +403,7 @@ set ( INC_FILES
inc/MantidAlgorithms/ResampleX.h inc/MantidAlgorithms/ResampleX.h
inc/MantidAlgorithms/ResetNegatives.h inc/MantidAlgorithms/ResetNegatives.h
inc/MantidAlgorithms/ResizeRectangularDetector.h inc/MantidAlgorithms/ResizeRectangularDetector.h
inc/MantidAlgorithms/RingProfile.h
inc/MantidAlgorithms/SANSDirectBeamScaling.h inc/MantidAlgorithms/SANSDirectBeamScaling.h
inc/MantidAlgorithms/SassenaFFT.h inc/MantidAlgorithms/SassenaFFT.h
inc/MantidAlgorithms/Scale.h inc/MantidAlgorithms/Scale.h
...@@ -411,7 +413,7 @@ set ( INC_FILES ...@@ -411,7 +413,7 @@ set ( INC_FILES
inc/MantidAlgorithms/SignalOverError.h inc/MantidAlgorithms/SignalOverError.h
inc/MantidAlgorithms/SmoothData.h inc/MantidAlgorithms/SmoothData.h
inc/MantidAlgorithms/SmoothNeighbours.h inc/MantidAlgorithms/SmoothNeighbours.h
inc/MantidAlgorithms/SofQCommon.h inc/MantidAlgorithms/SofQCommon.h
inc/MantidAlgorithms/SofQW.h inc/MantidAlgorithms/SofQW.h
inc/MantidAlgorithms/SofQW2.h inc/MantidAlgorithms/SofQW2.h
inc/MantidAlgorithms/SofQW3.h inc/MantidAlgorithms/SofQW3.h
...@@ -490,8 +492,8 @@ set ( TEST_FILES ...@@ -490,8 +492,8 @@ set ( TEST_FILES
ConjoinWorkspacesTest.h ConjoinWorkspacesTest.h
ConvertAxisByFormulaTest.h ConvertAxisByFormulaTest.h
ConvertFromDistributionTest.h ConvertFromDistributionTest.h
ConvertSpectrumAxisTest.h
ConvertSpectrumAxis2Test.h ConvertSpectrumAxis2Test.h
ConvertSpectrumAxisTest.h
ConvertTableToMatrixWorkspaceTest.h ConvertTableToMatrixWorkspaceTest.h
ConvertToDistributionTest.h ConvertToDistributionTest.h
ConvertToEventWorkspaceTest.h ConvertToEventWorkspaceTest.h
...@@ -617,6 +619,7 @@ set ( TEST_FILES ...@@ -617,6 +619,7 @@ set ( TEST_FILES
ResampleXTest.h ResampleXTest.h
ResetNegativesTest.h ResetNegativesTest.h
ResizeRectangularDetectorTest.h ResizeRectangularDetectorTest.h
RingProfileTest.h
SassenaFFTTest.h SassenaFFTTest.h
ScaleTest.h ScaleTest.h
ScaleXTest.h ScaleXTest.h
......
#ifndef MANTID_ALGORITHMS_RINGPROFILE_H_
#define MANTID_ALGORITHMS_RINGPROFILE_H_
#include "MantidKernel/System.h"
#include "MantidAPI/Algorithm.h"
namespace Mantid
{
namespace Algorithms
{
/** RingProfile : TODO: DESCRIPTION
Copyright © 2013 ISIS Rutherford Appleton Laboratory & NScD Oak Ridge National Laboratory
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 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/>.
File change history is stored at: <https://github.com/mantidproject/mantid>
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class DLLExport RingProfile : public API::Algorithm
{
public:
RingProfile();
virtual ~RingProfile();
virtual const std::string name() const;
virtual int version() const;
virtual const std::string category() const;
private:
virtual void initDocs();
void init();
void exec();
};
} // namespace Algorithms
} // namespace Mantid
#endif /* MANTID_ALGORITHMS_RINGPROFILE_H_ */
\ No newline at end of file
/*WIKI*
TODO: Enter a full wiki-markup description of your algorithm here. You can then use the Build/wiki_maker.py script to generate your full wiki page.
*WIKI*/
#include "MantidAlgorithms/RingProfile.h"
namespace Mantid
{
namespace Algorithms
{
// Register the algorithm into the AlgorithmFactory
DECLARE_ALGORITHM(RingProfile)
//----------------------------------------------------------------------------------------------
/** Constructor
*/
RingProfile::RingProfile()
{
}
//----------------------------------------------------------------------------------------------
/** Destructor
*/
RingProfile::~RingProfile()
{
}
//----------------------------------------------------------------------------------------------
/// Algorithm's name for identification. @see Algorithm::name
const std::string RingProfile::name() const { return "RingProfile";};
/// Algorithm's version for identification. @see Algorithm::version
int RingProfile::version() const { return 1;};
/// Algorithm's category for identification. @see Algorithm::category
const std::string RingProfile::category() const { return TODO: FILL IN A CATEGORY;}
//----------------------------------------------------------------------------------------------
/// Sets documentation strings for this algorithm
void RingProfile::initDocs()
{
this->setWikiSummary("TODO: Enter a quick description of your algorithm.");
this->setOptionalMessage("TODO: Enter a quick description of your algorithm.");
}
//----------------------------------------------------------------------------------------------
/** Initialize the algorithm's properties.
*/
void RingProfile::init()
{
declareProperty(new WorkspaceProperty<>("InputWorkspace","",Direction::Input), "An input workspace.");
declareProperty(new WorkspaceProperty<>("OutputWorkspace","",Direction::Output), "An output workspace.");
}
//----------------------------------------------------------------------------------------------
/** Execute the algorithm.
*/
void RingProfile::exec()
{
// TODO Auto-generated execute stub
}
} // namespace Algorithms
} // namespace Mantid
\ No newline at end of file
#ifndef MANTID_ALGORITHMS_RINGPROFILETEST_H_
#define MANTID_ALGORITHMS_RINGPROFILETEST_H_
#include <cxxtest/TestSuite.h>
#include "MantidAlgorithms/RingProfile.h"
using Mantid::Algorithms::RingProfile;
class RingProfileTest : 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 RingProfileTest *createSuite() { return new RingProfileTest(); }
static void destroySuite( RingProfileTest *suite ) { delete suite; }
void test_Init()
{
RingProfile alg;
TS_ASSERT_THROWS_NOTHING( alg.initialize() )
TS_ASSERT( alg.isInitialized() )
}
void test_exec()
{
// Name of the output workspace.
std::string outWSName("RingProfileTest_OutputWS");
RingProfile alg;
TS_ASSERT_THROWS_NOTHING( alg.initialize() )
TS_ASSERT( alg.isInitialized() )
TS_ASSERT_THROWS_NOTHING( alg.setPropertyValue("REPLACE_PROPERTY_NAME_HERE!!!!", "value") );
TS_ASSERT_THROWS_NOTHING( alg.setPropertyValue("OutputWorkspace", outWSName) );
TS_ASSERT_THROWS_NOTHING( alg.execute(); );
TS_ASSERT( alg.isExecuted() );
// Retrieve the workspace from data service. TODO: Change to your desired type
Workspace_sptr ws;
TS_ASSERT_THROWS_NOTHING( ws = AnalysisDataService::Instance().retrieveWS<Workspace>(outWSName) );
TS_ASSERT(ws);
if (!ws) return;
// TODO: Check the results
// Remove workspace from the data service.
AnalysisDataService::Instance().remove(outWSName);
}
void test_Something()
{
TSM_ASSERT( "You forgot to write a test!", 0);
}
};
#endif /* MANTID_ALGORITHMS_RINGPROFILETEST_H_ */
\ No newline at end of file
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