Skip to content

Commit

Permalink
refs #8589. Create a base algorithm class.
Browse files Browse the repository at this point in the history
  • Loading branch information
OwenArnold committed Dec 13, 2013
1 parent e2128e7 commit 8843ff2
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Code/Mantid/Framework/Algorithms/CMakeLists.txt
Expand Up @@ -170,6 +170,7 @@ set ( SRC_FILES
src/Rebunch.cpp
src/RecordPythonScript.cpp
src/ReflectometryReductionOne.cpp
src/ReflectometryWorkflowBase.cpp
src/Regroup.cpp
src/RemoveBins.cpp
src/RemoveExpDecay.cpp
Expand Down Expand Up @@ -394,6 +395,7 @@ set ( INC_FILES
inc/MantidAlgorithms/Rebunch.h
inc/MantidAlgorithms/RecordPythonScript.h
inc/MantidAlgorithms/ReflectometryReductionOne.h
inc/MantidAlgorithms/ReflectometryWorkflowBase.h
inc/MantidAlgorithms/Regroup.h
inc/MantidAlgorithms/RemoveBins.h
inc/MantidAlgorithms/RemoveExpDecay.h
Expand Down
Expand Up @@ -2,7 +2,7 @@
#define MANTID_ALGORITHMS_CREATETRANSMISSIONWORKSPACE_H_

#include "MantidKernel/System.h"
#include "MantidAPI/DataProcessorAlgorithm.h"
#include "MantidAlgorithms/ReflectometryWorkflowBase.h"

namespace Mantid
{
Expand Down Expand Up @@ -31,7 +31,7 @@ namespace Algorithms
File change history is stored at: <https://github.com/mantidproject/mantid>
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class DLLExport CreateTransmissionWorkspace : public API::DataProcessorAlgorithm
class DLLExport CreateTransmissionWorkspace : public ReflectometryWorkflowBase
{
public:
CreateTransmissionWorkspace();
Expand Down
Expand Up @@ -2,11 +2,11 @@
#define MANTID_ALGORITHMS_REFLECTOMETRYREDUCTIONONE_H_

#include "MantidKernel/System.h"
#include "MantidAPI/DataProcessorAlgorithm.h"
#include "MantidAPI/MatrixWorkspace.h"
#include "MantidGeometry/Instrument.h"
#include "MantidGeometry/IComponent.h"
#include "MantidGeometry/IDetector.h"
#include "MantidAlgorithms/ReflectometryWorkflowBase.h"
#include <boost/optional.hpp>
#include <boost/tuple/tuple.hpp>
#include <vector>
Expand Down Expand Up @@ -38,7 +38,7 @@ namespace Mantid
File change history is stored at: <https://github.com/mantidproject/mantid>
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class DLLExport ReflectometryReductionOne: public API::DataProcessorAlgorithm
class DLLExport ReflectometryReductionOne: public ReflectometryWorkflowBase
{
public:

Expand Down
@@ -0,0 +1,51 @@
#ifndef MANTID_ALGORITHMS_REFLECTOMETRYWORKFLOWBASE_H_
#define MANTID_ALGORITHMS_REFLECTOMETRYWORKFLOWBASE_H_

#include "MantidKernel/System.h"
#include "MantidAPI/DataProcessorAlgorithm.h"

namespace Mantid
{
namespace Algorithms
{

/** ReflectometryWorkflowBase : Abstract workflow algortithm base class containing common implementation functionality usable
* by concrete reflectometry workflow algorithms.
Copyright &copy; 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 ReflectometryWorkflowBase : public API::DataProcessorAlgorithm
{
public:
ReflectometryWorkflowBase();
virtual ~ReflectometryWorkflowBase();


//protected:


};


} // namespace Algorithms
} // namespace Mantid

#endif /* MANTID_ALGORITHMS_REFLECTOMETRYWORKFLOWBASE_H_ */
30 changes: 30 additions & 0 deletions Code/Mantid/Framework/Algorithms/src/ReflectometryWorkflowBase.cpp
@@ -0,0 +1,30 @@
/*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/ReflectometryWorkflowBase.h"

namespace Mantid
{
namespace Algorithms
{

//----------------------------------------------------------------------------------------------
/** Constructor
*/
ReflectometryWorkflowBase::ReflectometryWorkflowBase()
{
}

//----------------------------------------------------------------------------------------------
/** Destructor
*/
ReflectometryWorkflowBase::~ReflectometryWorkflowBase()
{
}




} // namespace Algorithms
} // namespace Mantid

0 comments on commit 8843ff2

Please sign in to comment.