From a35f1cf8b60435e4b74845d957336021947a7a2c Mon Sep 17 00:00:00 2001 From: "McDonnell, Marshall T" <mcdonnellmt@ornl.gov> Date: Wed, 9 May 2018 10:46:53 -0400 Subject: [PATCH] Clean up unnecessary includes --- .../CalculateCarpenterSampleCorrection.h | 21 +++++++------------ .../CarpenterSampleCorrection.h | 7 ------- .../CalculateCarpenterSampleCorrection.cpp | 12 +---------- .../src/CarpenterSampleCorrection.cpp | 15 +------------ .../CalculateCarpenterSampleCorrectionTest.h | 3 +-- 5 files changed, 10 insertions(+), 48 deletions(-) diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CalculateCarpenterSampleCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/CalculateCarpenterSampleCorrection.h index e9e9b151274..cf03f02fb16 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CalculateCarpenterSampleCorrection.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CalculateCarpenterSampleCorrection.h @@ -1,20 +1,13 @@ #ifndef MANTID_ALGORITHM_MULTIPLE_SCATTERING_ABSORPTION_H_ #define MANTID_ALGORITHM_MULTIPLE_SCATTERING_ABSORPTION_H_ -#include "MantidAPI/AlgorithmManager.h" -#include "MantidAPI/AnalysisDataService.h" #include "MantidAPI/DataProcessorAlgorithm.h" -#include "MantidAPI/WorkspaceGroup.h" -#include "MantidAPI/WorkspaceUnitValidator.h" #include "MantidHistogramData/Points.h" #include <vector> +using namespace Mantid::API; + namespace Mantid { -namespace HistogramData { -class HistogramX; -class HistogramY; -class HistogramE; -} namespace Algorithms { /** Multiple scattering absorption correction, originally used to correct vanadium spectrum at IPNS. Algorithm originally worked @@ -84,12 +77,12 @@ private: const HistogramData::Points &wavelength, HistogramData::HistogramY &y_val); - API::MatrixWorkspace_sptr - createOutputWorkspace(const API::MatrixWorkspace_sptr inputWS, + MatrixWorkspace_sptr + createOutputWorkspace(const MatrixWorkspace_sptr &inputWS, const std::string) const; - void deleteWorkspace(API::MatrixWorkspace_sptr workspace); - API::MatrixWorkspace_sptr - setUncertainties(API::MatrixWorkspace_sptr workspace); + void deleteWorkspace(MatrixWorkspace_sptr workspace); + MatrixWorkspace_sptr + setUncertainties(MatrixWorkspace_sptr workspace); }; } // namespace Algorithm diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CarpenterSampleCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/CarpenterSampleCorrection.h index 39a12122139..b93c822702b 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CarpenterSampleCorrection.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CarpenterSampleCorrection.h @@ -1,7 +1,5 @@ #ifndef MANTID_ALGORITHM_MULTIPLE_SCATTERING_ABSORPTION_H_ #define MANTID_ALGORITHM_MULTIPLE_SCATTERING_ABSORPTION_H_ -#include "MantidAPI/AlgorithmManager.h" -#include "MantidAPI/AnalysisDataService.h" #include "MantidAPI/DataProcessorAlgorithm.h" #include "MantidAPI/WorkspaceGroup.h" #include <vector> @@ -9,11 +7,6 @@ using namespace Mantid::API; namespace Mantid { -namespace HistogramData { -class HistogramX; -class HistogramY; -class HistogramE; -} namespace Algorithms { /** Multiple scattering absorption correction, originally used to correct vanadium spectrum at IPNS. Algorithm originally worked diff --git a/Framework/Algorithms/src/CalculateCarpenterSampleCorrection.cpp b/Framework/Algorithms/src/CalculateCarpenterSampleCorrection.cpp index 1e6fb5a5e98..aabd7a6ac8e 100644 --- a/Framework/Algorithms/src/CalculateCarpenterSampleCorrection.cpp +++ b/Framework/Algorithms/src/CalculateCarpenterSampleCorrection.cpp @@ -1,5 +1,4 @@ #include "MantidAlgorithms/CalculateCarpenterSampleCorrection.h" -#include "MantidAPI/AlgorithmManager.h" #include "MantidAPI/InstrumentValidator.h" #include "MantidAPI/Sample.h" #include "MantidAPI/SpectrumInfo.h" @@ -7,13 +6,9 @@ #include "MantidAPI/WorkspaceGroup.h" #include "MantidAPI/WorkspaceUnitValidator.h" #include "MantidDataObjects/EventWorkspace.h" -#include "MantidDataObjects/Workspace2D.h" -#include "MantidDataObjects/WorkspaceCreation.h" #include "MantidGeometry/Instrument.h" -#include "MantidGeometry/IComponent.h" #include "MantidKernel/CompositeValidator.h" #include "MantidKernel/Material.h" -#include "MantidKernel/PhysicalConstants.h" #include <stdexcept> @@ -25,14 +20,9 @@ DECLARE_ALGORITHM(CalculateCarpenterSampleCorrection) // Register the class using namespace Kernel; using namespace API; -using Mantid::DataObjects::EventList; using Mantid::DataObjects::EventWorkspace; using Mantid::DataObjects::EventWorkspace_sptr; -using Mantid::DataObjects::WeightedEventNoTime; -using Mantid::DataObjects::Workspace2D; -using Mantid::HistogramData::HistogramX; using Mantid::HistogramData::HistogramY; -using Mantid::HistogramData::HistogramE; using Mantid::HistogramData::Points; using std::vector; using namespace Mantid::PhysicalConstants; @@ -433,7 +423,7 @@ void CalculateCarpenterSampleCorrection::calculate_ms_correction( } MatrixWorkspace_sptr CalculateCarpenterSampleCorrection::createOutputWorkspace( - const MatrixWorkspace_sptr inputWksp, const std::string ylabel) const { + const MatrixWorkspace_sptr &inputWksp, const std::string ylabel) const { MatrixWorkspace_sptr outputWS = WorkspaceFactory::Instance().create(inputWksp); // The algorithm computes the signal values at bin centres so they should diff --git a/Framework/Algorithms/src/CarpenterSampleCorrection.cpp b/Framework/Algorithms/src/CarpenterSampleCorrection.cpp index c420182d49f..b5509616008 100644 --- a/Framework/Algorithms/src/CarpenterSampleCorrection.cpp +++ b/Framework/Algorithms/src/CarpenterSampleCorrection.cpp @@ -1,16 +1,8 @@ #include "MantidAlgorithms/CarpenterSampleCorrection.h" -#include "MantidAPI/AlgorithmManager.h" #include "MantidAPI/InstrumentValidator.h" -#include "MantidAPI/Sample.h" -#include "MantidAPI/SpectrumInfo.h" -#include "MantidAPI/WorkspaceFactory.h" #include "MantidAPI/WorkspaceUnitValidator.h" #include "MantidDataObjects/EventWorkspace.h" -#include "MantidGeometry/Instrument.h" -#include "MantidGeometry/IComponent.h" #include "MantidKernel/CompositeValidator.h" -#include "MantidKernel/Material.h" -#include "MantidKernel/PhysicalConstants.h" #include <stdexcept> @@ -22,15 +14,10 @@ DECLARE_ALGORITHM(CarpenterSampleCorrection) // Register the class using namespace Kernel; using namespace API; -using Mantid::DataObjects::EventList; using Mantid::DataObjects::EventWorkspace; using Mantid::DataObjects::EventWorkspace_sptr; -using Mantid::DataObjects::WeightedEventNoTime; -using Mantid::HistogramData::HistogramX; -using Mantid::HistogramData::HistogramY; -using Mantid::HistogramData::HistogramE; using std::vector; -using namespace Mantid::PhysicalConstants; +//using namespace Mantid::PhysicalConstants; using namespace Geometry; const std::string CarpenterSampleCorrection::name() const { diff --git a/Framework/Algorithms/test/CalculateCarpenterSampleCorrectionTest.h b/Framework/Algorithms/test/CalculateCarpenterSampleCorrectionTest.h index e27f5808a3b..45ca6916054 100644 --- a/Framework/Algorithms/test/CalculateCarpenterSampleCorrectionTest.h +++ b/Framework/Algorithms/test/CalculateCarpenterSampleCorrectionTest.h @@ -5,11 +5,10 @@ #include <vector> #include "MantidAlgorithms/CalculateCarpenterSampleCorrection.h" -#include "MantidDataObjects/EventWorkspace.h" #include "MantidDataObjects/WorkspaceCreation.h" -#include "MantidAPI/AnalysisDataService.h" #include "MantidAPI/Axis.h" #include "MantidAPI/FrameworkManager.h" +#include "MantidAPI/WorkspaceGroup.h" #include "MantidIndexing/IndexInfo.h" #include "MantidHistogramData/LinearGenerator.h" #include "MantidTestHelpers/WorkspaceCreationHelper.h" -- GitLab