Skip to content
Snippets Groups Projects
Commit 8c2e005d authored by Harry Jeffery's avatar Harry Jeffery
Browse files

Refs #10250 Add C++ Stitch1DMany stub

parent 37e602f8
No related merge requests found
......@@ -222,6 +222,7 @@ set ( SRC_FILES
src/SpecularReflectionPositionCorrect.cpp
src/SphericalAbsorption.cpp
src/Stitch1D.cpp
src/Stitch1DMany.cpp
src/StripPeaks.cpp
src/StripVanadiumPeaks.cpp
src/StripVanadiumPeaks2.cpp
......@@ -468,6 +469,7 @@ set ( INC_FILES
inc/MantidAlgorithms/SpecularReflectionPositionCorrect.h
inc/MantidAlgorithms/SphericalAbsorption.h
inc/MantidAlgorithms/Stitch1D.h
inc/MantidAlgorithms/Stitch1DMany.h
inc/MantidAlgorithms/StripPeaks.h
inc/MantidAlgorithms/StripVanadiumPeaks.h
inc/MantidAlgorithms/StripVanadiumPeaks2.h
......
#ifndef MANTID_ALGORITHMS_STITCH1DMANY_H_
#define MANTID_ALGORITHMS_STITCH1DMANY_H_
#include "MantidKernel/System.h"
#include "MantidAPI/Algorithm.h"
namespace Mantid
{
namespace Algorithms
{
/** Stitch1DMany : Stitches multiple Matrix Workspaces together into a single output.
Copyright © 2014 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 Stitch1DMany : public API::Algorithm
{
public:
/// Default constructor
Stitch1DMany()
{
}
;
/// Destructor
virtual ~Stitch1DMany()
{
}
;
/// Algorithm's name for identification. @see Algorithm::name
virtual const std::string name() const
{
return "Stitch1DMany";
}
/// Algorithm's version for identification. @see Algorithm::version
virtual int version() const
{
return 1;
}
/// Algorithm's category for identification. @see Algorithm::category
virtual const std::string category() const
{
return "Reflectometry";
}
///Summary of algorithm's purpose
virtual const std::string summary() const
{
return "Stitches histogram matrix workspaces together";
}
private:
/// Overwrites Algorithm method.
void init();
/// Overwrites Algorithm method.
void exec();
};
} // namespace Algorithms
} // namespace Mantid
#endif /* MANTID_ALGORITHMS_STITCH1DMANY_H_ */
#include "MantidAlgorithms/Stitch1DMany.h"
#include "MantidAPI/WorkspaceProperty.h"
#include "MantidAPI/MatrixWorkspace.h"
#include "MantidAPI/WorkspaceValidators.h"
#include "MantidKernel/ArrayProperty.h"
#include "MantidKernel/RebinParamsValidator.h"
#include "MantidKernel/BoundedValidator.h"
#include <boost/make_shared.hpp>
using namespace Mantid::Kernel;
using namespace Mantid::API;
namespace Mantid
{
namespace Algorithms
{
DECLARE_ALGORITHM(Stitch1DMany)
/** Initialize the algorithm's properties.
*/
void Stitch1DMany::init()
{
declareProperty(new ArrayProperty<std::string>("InputWorkspaces"),
"Input Workspaces. List of histogram workspaces to stitch together.");
declareProperty(new WorkspaceProperty<MatrixWorkspace>("OutputWorkspace", "", Direction::Output),
"Output stitched workspace.");
declareProperty(new ArrayProperty<double>("Params", boost::make_shared<RebinParamsValidator>(true)),
"Rebinning Parameters. See Rebin for format.");
declareProperty(new ArrayProperty<double>("StartOverlaps"), "Start overlaps for stitched workspaces.");
declareProperty(new ArrayProperty<double>("EndOverlaps"), "End overlaps for stitched workspaces.");
declareProperty(new PropertyWithValue<bool>("ScaleRHSWorkspace", true, Direction::Input),
"Scaling either with respect to workspace 1 or workspace 2");
declareProperty(new PropertyWithValue<bool>("UseManualScaleFactor", false, Direction::Input),
"True to use a provided value for the scale factor.");
auto manualScaleFactorValidator = boost::make_shared<BoundedValidator<double> >();
manualScaleFactorValidator->setLower(0);
manualScaleFactorValidator->setExclusive(true);
declareProperty(new PropertyWithValue<double>("ManualScaleFactor", 1.0, manualScaleFactorValidator, Direction::Input),
"Provided value for the scale factor.");
declareProperty(new ArrayProperty<double>("OutScaleFactors", Direction::Output),
"The actual used values for the scaling factores at each stitch step.");
}
/** Execute the algorithm.
*/
void Stitch1DMany::exec()
{
}
} // namespace Algorithms
} // namespace Mantid
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